in reply to Re: strings->can->isa but numbers->can't?
in thread strings->can->isa but numbers->can't?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: strings->can->isa but numbers->can't?
by choroba (Cardinal) on Apr 26, 2012 at 22:04 UTC |