Abigail <[email protected]> wrote:
> > In Perl the rule is: If its an alpha-numeric char then escaping it
> > turns it into a meta pattern. If its non-alpha then escaping it turns
> > it into a literal. The latter rule is hard, and afaik applies to every
> > Perl. Hatefully tho perl will treat an unknown escape-alphanum
> > sequence as an unescaped char, not even warning.
>
>
> $ perl -wle '"q" =~ /\q/ or print "Ping"'
> Unrecognized escape \q passed through at -e line 1.
>
> Which to me seems that Perl treats an unknown escape-alphanum as an
> unescape char and it warns it did so.
Only since Perl 5.6:
$ /usr/local/perl/5.5.3/bin/perl -wle '"q" =~ /\q/ or print "Ping"'
$
I was caught by this because File::Temp uses \z and it didn't produce any
warning under Perl 5.4.
--
Sébastien Aperghis-Tramoni
Close the world, txEn eht nepO.