in reply to Re^2: $1[ (or "Does an array @1 exist in Perl ? - Yes!")
in thread $1[
One can use "$1[$2]$3[$4]$5" expecting no array (with impossible names according doc) interpretation.
No, the documentation does not say they are impossible at all:
Perl variable names may also be a sequence of digits, a single punctuation character, or the two-character sequence: ^ (caret or CIRCUMFLEX ACCENT) followed by any one of the characters [][A-Z^_?\] . These names are all reserved for special uses by Perl; for example, the all-digits names are used to hold data captured by backreferences after a regular expression match.
So @1, @2, @1066, etc. are all perfectly valid. They are just reserved for special uses by Perl.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: $1[ (reserved != allowed)
by LanX (Saint) on Oct 11, 2017 at 15:31 UTC | |
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 |