I can do this:

my $hashref = \%hash;

But as near as I can tell, there is no way to do the reverse operation: making a "my %hash" that is an alias for a hash reference.

It's possible with a package variable:

#/usr/bin/perl
our %hash;
my $hashref = { a => 5 , b => 8 };
*hash = $hashref;
print $hash{a};

that prints "5". But there's no way to do this with a lexical (my) variable.

is this right?

--
Aaron Priven, [EMAIL PROTECTED],com, http://www.priven.com/aaron

Reply via email to