26 Mar
2007
26 Mar
'07
11:40 a.m.
I want to switch off the significance of special characters when matching an expression in perl, i.e. I have a line that says:- if (@_[0] =~ /$a/i) (isn't perl horrible!) and I want a '.' in the $a to be actually matched. I can't easily escape the '.' with a '\' because the $a is also used as a filename and if I put the '\' I get a filename with a '\' in it as well which I don't want. All I actually want is a case insensitive string comparison with no characters having any special meaning at all. -- Chris Green