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

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

Thread Previous | Thread Next
Father Chrysostomos via RT
November 27, 2012 07:14
[perl #4289] bleadperl@7050 late evaluation of $&
Message ID:
On Mon Sep 11 12:23:39 2000, 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


Father Chrysostomos

via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About