Hash map creation : keys « Hash « Perl
- Perl
- Hash
- keys
Hash map creation
#!C:/Perl/Bin
%animals = (H=> 'h', S=> 's', G=> 'g');
print "$animals{'Shark'} \n\n";
foreach $creature(keys %animals)
{
print "$creature \n";
}
Related examples in the same category