in reply to Re: using a regex to determine if a string is the start of the FILE
in thread using a regex to determine if a string is the start of the FILE

My apologies. In another part of the code, which I didn't post the compile statement looks like:
my $rx = qr/$_/;

and I can't change that either. I do believe there is a way to put modifiers into a regex tho, I'll have a poke around in perlretut

  • Comment on Re^2: using a regex to determine if a string is the start of the FILE
  • Download Code

Replies are listed 'Best First'.
Re^3: using a regex to determine if a string is the start of the FILE
by moritz (Cardinal) on Sep 18, 2008 at 12:35 UTC
    Yes you can, (?ms:$regex).

    Note that the scoping of /m inside the regex changed between perl 5.8.8 and perl 5.10.0.