in reply to <<, variable, and single quote behaving badly.

Simply put: $x::s and $x's are equivalent to perl. The reason for that is backward compatibility: the apostrophe was perl4's package name separator, on perl5, it's the double semicolon. But the apostrophe still works.

Sample code:

$Foo'x = 123; print $Foo::x;
Result:
  123

The odd thing might be that this still doesn't produce a warning under perl5.8.3.

Replies are listed 'Best First'.
Re: Re: <<, variable, and single quote behaving badly.
by Errto (Vicar) on Apr 27, 2004 at 01:20 UTC
    For better or worse (better I suppose), this syntax will disappear in Perl 6 according to Apocalypse 2. See Larry's comments under RFC 071. Of course, large parts of A02 have been rethought since then, but I don't think this is one of them.