Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^4: $1[ (reserved != allowed)by LanX (Saint) |
on Oct 11, 2017 at 15:31 UTC ( [id://1201170]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|