develooper Front page | perl.perl5.porters | Postings from January 2012

RE: \Questions about the \Future of \Escapes

Thread Previous | Thread Next
From:
Konovalov, Vadim ** CTR **
Date:
January 5, 2012 03:46
Subject:
RE: \Questions about the \Future of \Escapes
Message ID:
35BF8D9716175C43BB9D67CA60CC345E2ECCC1C5@FRMRSSXCHMBSC2.dc-m.alcatel-lucent.com
> From: Abigail 
> I don't have anything older than 5.005_04 at the moment, but:
> 
>    $ /opt/perl/5.005_04/bin/perl -wle 'print qr"-\U\x{20}-"'
>    (?-xism:-\X{20}-)

earlier perl do not have 'qr' construct:

D:\>D:\perl-tests\perl-5-004-02\bin\perl.exe -we "print qr/-\U\x{20}-/"
Unquoted string "qr" may clash with future reserved word at -e line 1.
Name "main::qr" used only once: possible typo at -e line 1.
Use of uninitialized value at -e line 1.
Filehandle main::qr never opened at -e line 1.

but:
D:\>D:\perl-tests\perl-5-004-02\bin\perl.exe -we "print qq/-\U\x{20}-/"
- {20}-

the whitespace is actually \x00:

D:\>D:\perl-tests\perl-5-004-02\bin\perl.exe -we "print unpack('H*',qq/-\U\x{20}-/)"
2d007b32307d2d 

> So, this issue has been around for a while...

Regards,
Vadim.
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About