> I think this might do it, presuming you have access to cat or 
> similar.

> cat logfile.log | perl -e 'while (<>) { print if /Error/ }'

> `perldoc perlrequick` would have given you the answer just as 
> quickly.

  Why do you use 'cat'?  First of all it won't work for people who
aren't on UNIX/Linux systems.  Secondly it isn't needed.

  perl -e 'while (<>) { print if /Error/ }' logfile.log

  Perl doesn't have to have input fed to it via STDIN exclusively.

  This is like you are approaching your front door with your key in hand
but you call the locksmith to unlock your door for you.  You can do
that, but why?

Ken Wolcott

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to