develooper Front page | perl.perl5.porters | Postings from December 2017

Re: [perl #131664] Interpolation of @{^CAPTURE} and its friendsdoesn't work

Thread Next
From:
Zefram
Date:
December 30, 2017 12:04
Subject:
Re: [perl #131664] Interpolation of @{^CAPTURE} and its friendsdoesn't work
Message ID:
20171230120407.GE19698@fysh.org
The behaviour here is not a bug.  The rule that braces fully delimit
the interpolatable expression is a deliberate one, of long standing, and
deliberately different from the syntax of array/hash element references
outside quotes.  The treatment of "${^CAPTURE}[0]" is consistent with
that of "${foo}[0]", and for that matter with "${^MATCH}[0]" which can
quite easily be used deliberately.  Hat-based variable names have no
less need for this delimitation than other variable names.

If this rule were to be changed, it would require a deprecation cycle.
But we should not change it, and this ticket should be closed.

-zefram

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