i was wondering if anybody knew a way to match a regex with or without the
/s modifier based on a boolean. there is a variable called $* that allows
you to set it to true so that regexs will match with the /m modifier but
is there a /s equivilant?

my $allow_splat_to_match_slash_n = 0;

if ($allow_splat_to_match_slash_n) {
  $string =~ /regex/s;
  ...
} else { 
  $string =~ /regex/;
}

this code is sloppy. there must be a better way. 

-mike
X=8


Reply via email to