in reply to Re^3: $1[ (or "Does an array @1 exist in Perl ? - Yes!")
in thread $1[
One can reserve @1 , but the parser should croak or at least warn as long as the reservation wasn't filled with meaning.
I think %+ and %- are good examples of taking advantage of reserved variables after introducing named captures in regex. ( added in Perl v5.10.0)
@1 has no special meaning and doesn't need to be declared under strict!
As a side note, it's possible to use @a or %b without explicit declaration under strict ... that's really not optimal and really should be documented.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: $1[ (reserved != allowed)
by rsFalse (Chaplain) on Oct 28, 2017 at 13:30 UTC | |
by LanX (Saint) on Oct 28, 2017 at 13:55 UTC | |
by rsFalse (Chaplain) on Oct 28, 2017 at 15:59 UTC |
In Section
Seekers of Perl Wisdom