in reply to Re: (tye)Re: How to gracefully deal with a regex problem
in thread How to gracefully deal with a regex problem
Well, I wasn't thinking of the right-hand part of a regex because:
$problem= "["; $str= "(input)"; $str =~ s/input/input value="$problem"/; print "<$str>\n"; # produces <(input value="[")>
So I don't see how your original problem matches this problem.
I was thinking of the fact that people surprisingly often write $str =~ /\Q$sub\E/ instead of index($str,$sub).
Now that you give us more information, it looks to me like you need to be using CGI.pm which will know how to escape your parameter values properly.
- tye (but my friends call me "Tye")
|
|---|