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

[perl #24237] @& doesn't set PL_sawampersand

Thread Next
From:
Alexandr Ciornii via RT
Date:
May 10, 2010 10:34
Subject:
[perl #24237] @& doesn't set PL_sawampersand
Message ID:
rt-3.6.HEAD-10623-1273512638-151.24237-15-0@perl.org
Same result on 5.12.0, but I'm not sure that it is worth fixing.

On Fri Oct 17 13:24:08 2003, grazz@pobox.com wrote:

> 
> If you use (for example) @& before using $&, then $& loses
> its magic.
> 
>     % perl -le '"foo" =~ /.*/; print "[$&]"'
>     [foo]
> 
>     % perl -le '@&; "foo" =~ /.*/; print "[$&]"'
>     []
> 
> This worked correctly in 5.6.1 -- but of course the old behavior
> wasn't ideal either, since it set PL_sawampersand unnecessarily.
> 
>    http://xrl.us/xk7
> 

-- 
Alexandr Ciornii, http://chorny.net


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