Mega Code Archive

 
Categories / Perl / Hash
 

Looping Over A Hash

#!/usr/bin/perl use warnings; use strict; my %where=(     G => "g",     L => "l",     I => "i",     S => "s" ); for (keys %where) { print "$_ lives in $where{$_}\n"; }