[Israel.pm] regex question

Yossi.Itzkovich at ecitele.com Yossi.Itzkovich at ecitele.com
Wed Jun 21 05:39:30 PDT 2006


Hi,

I was asked by a friend:

if ($a)
{
      m/$pattern/;
}
else
{
      m/$pattern/s;
}


Is there a way to write the regex line only once ? can I put the "s" option
as a variable ?

Thanks

Yossi




More information about the Perl mailing list