develooper Front page | perl.perl5.porters | Postings from December 2010

[perl #81286] Subsequent assertions with \G and gc modifiers dont work as expected

Thread Previous | Thread Next
From:
Jacob Gelbman
Date:
December 26, 2010 03:37
Subject:
[perl #81286] Subsequent assertions with \G and gc modifiers dont work as expected
Message ID:
rt-3.6.HEAD-5425-1293316018-332.81286-75-0@perl.org
# New Ticket Created by  Jacob Gelbman 
# Please include the string:  [perl #81286]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81286 >


Under Perl 5.12.1, the following test does not succeed.

use Test::More;
$_ = "abc";
ok /\G^/gc;
ok /\G^/gc; # not ok

Since you can't be on the "other side" of an assertion, I would expect  
subsequent regexes to work as the one before them.

Also, if between the regexes, I put the following, things work as  
expected:

pos($_) = pos($_);

Thanks,
Jake


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