Elsewhere, Perl will stringify when it wants a string. There's no good explanation as to why it doesn't do that here. Sure there is, 3 is not a valid package or subroutine, name
$ perl -le " package 3; "
syntax error at -e line 1, near "package 3;"
Execution of -e aborted due to compilation errors.
$ perl -le " $3::3 "
Bareword found where operator expected at -e line 1, near "$3::3"
(Missing operator before ::3?)
syntax error at -e line 1, near "$3::3
"
Execution of -e aborted due to compilation errors.
$ perl -le " sub 3 { 3 } "
Illegal declaration of anonymous subroutine at -e line 1.
|