in reply to Re: Brief Hash Tutorial
in thread Brief Hash Tutorial
It takes a little getting used to, but all makes sense after a while.$hashref = \%hash; # $hashref is a scalar pointing to %hash %$hashref or %{$hashref}# the same as %hash $hash{'key'} # is the same as $hashref->{'key'} $hashref->{'key'} = \@array; # Make this key a reference to the array +@array @{$hashref->{'key'}} # the same as @array, the extra brackets {} show +you are looking for the array in $hashref->{'key'} and not an array i +n $hashref $hashref->{'key'}->[0] # same as $array[0]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Brief Hash Tutorial
by dreadpiratepeter (Priest) on Aug 31, 2008 at 13:30 UTC | |
|
Re^3: Brief Hash Tutorial
by gw1500se (Beadle) on Aug 31, 2008 at 02:40 UTC | |
|
Re^3: Brief Hash Tutorial
by JadeNB (Chaplain) on Sep 01, 2008 at 01:19 UTC |