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

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

Thread Next
December 30, 2017 12:04
Re: [perl #131664] Interpolation of @{^CAPTURE} and its friendsdoesn't work
Message ID:
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.


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