On 2010-12-27 23:34, Parag Kalra wrote:

I was under the impression that regex modifier '/x' ignores the white
space. So in following script both the if-else blocks should print
"Match" since the strings differ only in white space and '/x' should
ignore the white space.

See perlre:

  x   Extend your pattern’s legibility by permitting whitespace
      and comments.

Confusing indeed when you come from (for example) sed, where the 'pattern' is the data.

So read 'regex' where it says 'pattern' there.

--
Ruud

--
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