develooper Front page | perl.perl5.porters | Postings from October 2014

qr/[\:]/ works consistently but stringifies differently - is thisnormal?

Thread Next
From:
Peter Rabbitson
Date:
October 31, 2014 06:51
Subject:
qr/[\:]/ works consistently but stringifies differently - is thisnormal?
Message ID:
54533165.2030106@rabbit.us
perlbrew exec perl -Mstrict -Mwarnings -e 'warn my $str = "foo\\bar"; 
warn my $re = qr/[\:]/; warn( $str =~ $re ? 1 : 0 )'

(identical output omitted)

5.6.1
==========
foo\bar at -e line 1.
(?-xism:[:]) at -e line 1.
0 at -e line 1.

...


5.8.1
==========
foo\bar at -e line 1.
(?-xism:[:]) at -e line 1.
0 at -e line 1.

...


5.8.9
==========
foo\bar at -e line 1.
(?-xism:[:]) at -e line 1.
0 at -e line 1.

...

5.10.0
==========
foo\bar at -e line 1.
(?-xism:[\:]) at -e line 1.
0 at -e line 1.

...

5.12.5
==========
foo\bar at -e line 1.
(?-xism:[\:]) at -e line 1.
0 at -e line 1.

...

5.14.0
==========
foo\bar at -e line 1.
(?^:[\:]) at -e line 1.
0 at -e line 1.

...

5.20.1
==========
foo\bar at -e line 1.
(?^:[\:]) at -e line 1.
0 at -e line 1.


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