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

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

2023-06-15 Thread Freek de Kruijf
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 I can not find what the second line is