Try this:
In general, $h{x}{y} is shorthand for $h{x}->{y}, meaning that the content of $h{x} is a hash ref, just like $hash_ref above; once dereferenced, it can be used like any other hash.my @keys = qw(a b c d); my $hash_ref; @{ $hash_ref }{@keys} = (1) x @keys; print "$_\n" for keys %$hash_ref; __END__
the lowliest monk
In reply to Re: Is this a hash slice?
by tlm
in thread Is this a hash slice?
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |