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

[perl #4289] bleadperl@7050 late evaluation of $&

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
November 27, 2012 07:14
Subject:
[perl #4289] bleadperl@7050 late evaluation of $&
Message ID:
rt-3.6.HEAD-17500-1354029261-1365.4289-15-0@perl.org
On Mon Sep 11 12:23:39 2000, hv@crypt.compulink.co.uk wrote:
> crypt% ./perl -wle '%a=qw/foo bar/; $a{foo}=~/.*/; delete $a{foo};
> print eval q{$&}'
> Uv
> crypt% ./perl -wle '%a=qw/foo bar/; $a{foo}=~/.*/; delete $a{foo};
> print eval q{$&}' | hd
> 00000000  00 55 17 0a
> crypt%
> 
> I'm not quite sure what it thinks it is printing here, but it looks no
> more than a whisker shy of a coredump.
> 
> I don't know what this should be doing: ideally it would say "bar",
> but
> other reasonable options are 'Use of uninitialised value at ...'
> (warning) or 'Too late for $& at ...' (fatal).

As of commit 1a904fc8 it does say bar.  As is typical of me, I put a
typo in the commit message.  The instructions for reënabling the bug say
to use -Accflags=PERL_SAWAMPERSAND instead of
-Accflags=-DPERL_SAWAMPERSAND.  

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=4289

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