Mega Code Archive

 
Categories / Perl / Hash
 

Using hash reference to retrieve value from hash

$hash{fruit} = apple; $hash{sandwich} = hamburger; $hash{drink} = bubbly; $hashref = \%hash; print $hashref->{sandwich};