> Er, I beg to differ. \%hash returns a reference to that hash -
> see the top of p.246 of the camel book, 2nd ed.
> The {} operators are for creating *anonymous* hashes.
I stand corrected. I was thinking of \($a, $b, $c). I always thought
\@array and \%hash worked the same way, so I never used them.
Sorry,
ELB
test.pl
=======
%hash = (a => '1', b => '2', c => '3');
@array = qw(a b c);
@array_ref = \@array; # returns ref to array
@hash_ref = \%hash; # returns ref to hash
@list_ref = \(@array); # returns ref for each element
{
local $, = ', ';
local $\ = "\n";
print(@array_ref); # prints: ARRAY(0x655b78)
print(@hash_ref); # prints: HASH(0x655af4)
print(@list_ref); # prints:
# SCALAR(0x6559bc), SCALAR(0x6559d4), SCALAR(0x6559ec)
}
--
Eric L. Brine | Chicken: The egg's way of making more eggs.
[EMAIL PROTECTED] | Do you always hit the nail on the thumb?
ICQ# 4629314 | An optimist thinks thorn bushes have roses.