http://perldoc.perl.org/perlre.html --> Try reading this Assertions
Page


You can also try something like
if(~/\s+error\s+|^error\s+|\s+error$/si)

this means one or more blank spaces
sometimes the error word may be in beginning(^error\s+) or in the end
of line(\s+error$).

~ Saran




On May 18, 12:06 pm, irfan_sayed2...@yahoo.com (Irfan Sayed) wrote:
> hi,
>
> i need to catch "error" word in log file
>
> i used reg exp like this :
>
> if ($_ =~ /\berror\b/)
> is this correct ?
>
> --irfu


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to