in reply to Escaping metacharacters

I just cut and pasted your code into my Solaris box running Perl 5.6.1 and it worked fine. What version of perl are you using and what OS?

UPDATE: Sorry, stupid mistake. Didn't see that the version of perl was stated RIGHT IN THE QUESTION!.