derek3000 has asked for the wisdom of the Perl Monks concerning the following question:
sub driver{ my $pattern = shift; my $modifiers = shift; while(<LOG>){ if ($_ =~ /$pattern/$modifiers){ print $_; } close LOG; } }
ok, there may be typos in that, but then again, there may be typos in the driver program that I have. I looked in the camel and didn't find it. I get an error "string found where operator expected". If there's something up with the way I wrote it, I may have just typed it wrong. Is there anything special I have to do to interpolate the modifiers.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Store regex modifiers in variables?
by no_slogan (Deacon) on Jul 10, 2001 at 00:07 UTC | |
by tye (Sage) on Jul 10, 2001 at 00:30 UTC | |
by smferris (Beadle) on May 15, 2002 at 16:06 UTC | |
Re: Store regex modifiers in variables?
by tachyon (Chancellor) on Jul 10, 2001 at 00:28 UTC | |
Re: Store regex modifiers in variables?
by japhy (Canon) on Jul 10, 2001 at 01:39 UTC | |
Re: Store regex modifiers in variables?
by derek3000 (Beadle) on Jul 10, 2001 at 00:39 UTC |