Nope, didn't try it -- because in Ruby, __FILE__ is a variable (or constant, or something to that effect, unless I'm grossly mistaken), and in Perl it cannot be a variable thanks to the fact there's no leading sigil. I guess maybe I should have tried it anyway, on the wild-ass guess that maybe it'd magically work somehow regardless of my apparently false assumptions.
I'd been searching for anything and everything I could think to search for that might give such information, using Google, since it didn't occur to me that there'd be a whole class of variable-like things called "special literals" in Perl.
Anyway, thanks for pointing that out.
print substr("Just another Perl hacker", 0, -2); |
|
- apotheon
CopyWrite Chad Perrin |
| [reply] |
| [reply] |
An entire category of entities just for three pseudo-constants, for hysterical purposes thanks to C legacy. Yeah. I think that qualifies as a wart on the language.
. . . but I still do love my Perl so. Thanks again.
print substr("Just another Perl hacker", 0, -2); |
|
- apotheon
CopyWrite Chad Perrin |
| [reply] |
actually, __FILE__ is exactly the same thing in perl: a variable, a constant, or something else.
| [reply] |
| [reply] |