programming-examples/perl/Hash/Pass key and get value.pl

8 lines
118 B
Perl
Raw Normal View History

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