programming-examples/perl/Hash/Using hash reference to retrieve value from hash.pl

6 lines
126 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$hash{fruit} = apple;
$hash{sandwich} = hamburger;
$hash{drink} = bubbly;
$hashref = \%hash;
print $hashref->{sandwich};