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
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
} 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",