On Oct 19, Suvajit Sengupta said:
To ignore the white space in between ROAM and ACT use /x modifier of Perl RE
to extend your pattern's legibility by permitting whitespace and comments.
Hope that will serve your purpose.
Instead of
if ($msg =~ /roam act/i)
Use
if ($msg =~ /roam act/ix)
You're misunderstanding the /x modifier. Using /x means that all
whitespace in your regex is ignored, not that all whitespace in the STRING
is ignored. Only "roamact" is matched by /roam act/x, since the " " in
the regex is ignored due to the /x modifier.
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
http://www.perlmonks.org/ % have long ago been overpaid?
http://princeton.pm.org/ % -- Meister Eckhart
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>