develooper Front page | perl.perl5.porters | Postings from December 2000

Can't escape package separator in symbolic var name

Thread Next
From:
John L. Allen
Date:
December 13, 2000 07:06
Subject:
Can't escape package separator in symbolic var name
Message ID:
200012131506.eBDF6Wi28033@gateway.grumman.com
There is no way to escape the interpretation of a ' or :: as a
package separator within a symbolic variable name.  Would this
perhaps be an oversight if not really a bug?

$x = "y\\'z";

${$x} = 9;              # sets $z in package "y\\" to 9

print ${"y\\::z"};      # prints 9, the value of $z in package "y\\"

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About