in reply to Sorting a Hash Ref

If you have a hash reference $foo, then the hash is %{$foo}. This is all need to you know, if you know how to use a hash.

%foo %{$bar} @foo{...} @{$bar}{...} $foo{...} ${$bar}{...}
If the reference is in a normal scalar variable, you can leave out the first set of {}, so you get %$bar, @$bar and $$bar. As a special case, $$bar{...} can be written as $bar->{...}. This arrow notation is the preferred method.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


Perl 6 changes:

Replies are listed 'Best First'.
Re^2: Sorting a Hash Ref
by bkiahg (Pilgrim) on Oct 26, 2005 at 20:58 UTC
    Perl 6 sounds like it has some nice features.