Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
so far i'm finding that perl doesn't like it (syntax error style of dislike) - i'm having a hard time finding any official word from the docs or other sources as to whether or not this is specifically not possible or some alternate way of performing the same. any help appreciated!my $flags = 'i'; my $string = "this is a tEst"; if ( $string =~ m/text/$flags ) { print "this worked\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: variable flags to match operator?
by Fletch (Bishop) on Sep 14, 2003 at 21:32 UTC | |
|
Re: variable flags to match operator?
by gjb (Vicar) on Sep 14, 2003 at 21:34 UTC | |
|
Re: variable flags to match operator?
by Anonymous Monk on Sep 14, 2003 at 21:45 UTC |