15 lines
229 B
Perl
15 lines
229 B
Perl
sub gethash ()
|
|
{
|
|
$hash{fruit} = peach;
|
|
$hash{vegetable} = broccoli;
|
|
$hash{pie} = blueberry;
|
|
|
|
return %hash;
|
|
}
|
|
|
|
%myhash = gethash;
|
|
|
|
foreach $key (keys %myhash) {
|
|
print "$key => $myhash{$key}\n";
|
|
}
|