in reply to Re^2: Calling locally manufactured (typeglob) methods
in thread Calling locally manufactured (typeglob) methods
Perl variable names may also be a sequence of digits or a single punctuation or control character. These names are all reserved for special uses by Perl;That means you're not supposed to use them outside their intended, reserved, special contexts.
What's more:
Doesn't look very valid on the face of it, does it?% perl -e 'my $14' Can't use global $14 in "my" at -e line 1, at end of line % perl -e '$1 = q/foo/' Modification of a read-only value attempted at -e line 1. % perl -e 'sub 14 { 14 }' Illegal declaration of anonymous subroutine at -e line 1.
So in order to (ab)use them like ordinary identifiers at all, you have to jump through hoops. And you'll get pummeled to death by your coworkers or future maintenance programmers. That's why I said "invalid". It may not be technically precise, but in practice it's accurate enough.
|
|---|