Wc -Sx- Jones wrote: > > [Becuase of a recent discussion on Postfix-users list] > Would anyone like to expand/explain what, exactly, is // matching below: > > #! perl > > use strict; > use warnings; > > my $idx; > > while (<DATA>) { > ++$idx; print "Line $idx - seen $_" if //; > } > __DATA__ > > > Line 3 > > Line 5
This is from perldoc perlop: If the PATTERN evaluates to the empty string, the last *successfully* matched regular expression is used instead. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>