in reply to Reducing a line read into $_
can just as easily be:foreach (<LOG>) { if ($_ =~/CRITICAL/) { print $_; }
foreach (<LOG>) { if (/CRITICAL/) { print; } }
Beginning perl programmers tend to like to leave $_ in explicitly, so they can see what they're doing, but it's generally better to leave it out and learn to read it implicitly yourself.
Tony
|
|---|