in reply to Re^2: printing the line after grepping
in thread printing the line after grepping

Actually, while (my $line = <$INFILE>) is equally magical.
while (<$INFILE>) => while (defined($_ = <$INFILE>) while (my $line = <$INFILE>) => while (defined(my $line = <$INFILE>)

Replies are listed 'Best First'.
Re^4: printing the line after grepping
by 7stud (Deacon) on Nov 11, 2009 at 18:23 UTC
    Equally magical? Nothing gets assigned to $_ in the latter case.
      Yes. In both cases, the code that's executed is different than the code in the file.