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

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

Thread Next
From:
Father Chrysostomos via RT
Date:
June 22, 2012 13:08
Subject:
[perl #113792] Unused punctuation variables don't interpolate
Message ID:
rt-3.6.HEAD-5009-1340395693-1959.113792-15-0@perl.org
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.

-- 

Father Chrysostomos


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

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