If I've read the question right, a sensible way to do this is to use the i modifier, dependent upon a command-line parameter.
if ($case == 0) { $foo =~ s/INSERTREGEXHERE/i; } else { $foo =~ s/INSERTREGEXHERE/; }
In the case where we have stored our command line switch from @ARGV in $case as a binary flag - 0 for case-insensitive and 1 for case sensitive.
Is this what your looking for?
UPDATE: Updated after incorrectly reading question for the first time. D'oh.
"What this book tells me is that goose-stepping morons, such as yourself, should read books instead of burning them."
In reply to Re: Regex Ignore Case
by Elgon
- Dr. Jones Snr, Indiana Jones and the Last Crusade
in thread Regex Ignore Case
by Anonymous Monk
For:
Use:
& & < < > > [ [ ] ]