in reply to REGEX question
That being said, I will give you the benefit of the doubt. My guess is that it will not work because it should be lc($string) not lc $string or lc_$string.
Also, for readability I would do:
At least it is a little clearer.for ( keys %input ) { my $string = $_ . $input->param('wrapper'); my $lcstring = $input->param('wrapper') . lc($string); my $ucstring = $input->param('wrapper') . uc($string); $report =~ s/$input->param('wrapper')$string/$input->param($_)/g; $report =~ s/$input->param('wrapper')$lcstring/$input->param($_)/g +; $report =~ s/$input->param('wrapper')$ucstring/$input->param($_)/g +; }
What is not clear, is why you want to do this. It looks very strange.
NOTE: This is untested, but I think it should work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: REGEX question
by S_Shrum (Pilgrim) on Feb 06, 2002 at 05:58 UTC |