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

[perl #113792] Unused punctuation variables don't interpolate

Thread Previous | Thread Next
From:
Eric Brine via RT
Date:
June 22, 2012 14:59
Subject:
[perl #113792] Unused punctuation variables don't interpolate
Message ID:
rt-3.6.HEAD-5009-1340402375-578.113792-15-0@perl.org
On Fri Jun 22 13:08:13 2012, sprout wrote:
> On Fri Jun 22 12:57:15 2012, ikegami@adaelis.com wrote:
> > $ perl -E'"abc" =~ /(b)/; say "@+"'
> > 2 2
> > 
> > $ perl -E'@_ = qw( a b c ); say "@_"'
> > a b c
> > 
> > $ perl -E'@. = qw( a b c ); say "@."'
> > @.
> > 
> > $ perl -E'@. = qw( a b c ); say "@{.}"'
> > a b c
> > 
> > What's up with #3?
> 
> toke.c special-cases certain punct vars.  Without thinking about this in
> detail, my gut feeling is that allowing "@." will open up a can of worms.
> 
> Also, there may be people wholly unintentionally relying on this.  I
> know many times I’ve forgotten to escape my @’s and wondered why they
> were disappearing.
> 

Are you saying this is a documentation bug?


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

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