Re: What is the meaning of $normalize->{$1}

2023-06-16 Thread Freek de Kruijf
Op donderdag 15 juni 2023 22:31:31 CEST schreef Claude Brown: > Is there any prior mention of "$normalise" in the script? Only now I see the first mentioning of $normalize as: $normalize = {} The naming of it is quite confusing to me. More logically would have been "present". Now I understand

Re: What is the meaning of $normalize->{$1}

2023-06-15 Thread Kang-min Liu
Freek de Kruijf writes: > Hi, > > I am trying to understand fully a perl program with the following lines: > >} elsif( /^(\#?\s*(?:pickup|qmgr)\s+)(?:fifo|unix)(\s+.*)/ ) { > if( defined $normalize->{$1} ) { next; } else { $normalize->{$1} = 1; } > I do understand the first line, but

Re: What is the meaning of $normalize->{$1}

2023-06-15 Thread Andy Bach
} elsif( /^(\#?\s*(?:pickup|qmgr)\s+)(?:fifo|unix)(\s+.*)/ ) { if( defined $normalize->{$1} ) { next; } else { $normalize->{$1} = 1; } if the string starting at the beginning of the line matches, $1 will contain "zero or one #, zero or more whitespaces, either the word "pickup" or "qmgr",