[Israel.pm] perl regex operator question

Yossi Itzkovich Yossi.Itzkovich at ecitele.com
Sun Jun 27 05:10:37 PDT 2010


We have a code that didn't work, it is something like:
While (! $line =~/something/)
{ ... }

It didn't work (I mean it never entered the code block).  We couldn't find the problem, so just as trying woodo we changed it into:

While ( $line !~/something/)
{ ... }

And now it works.  Then we change the original code into :
While (! ($line =~/something/))
{ ... }

And it works again.  What was the problem with the first version ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20100627/e42d7cc3/attachment-0001.htm 

More information about the Perl mailing list