On Mon, Mar 26, 2007 at 12:00:51PM +0100, Brett Parker wrote:
On Mon, Mar 26, 2007 at 11:40:21AM +0100, List Mail wrote:
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)
Try: if (@_[0] =~ /\Q$a\E/i)
Yes, thanks to you and Martijn, that's exactly what I want.
It is a sub-string match so I can't just test for equality (I hadn't realised that until I dug into the code a little).