in reply to how to put hash key and value in order
%coins = ( "Quarter", 25, "Dime", 10, "Nickel", 5 ); foreach my $key (sort keys %coins) { print "$key: $coins{$key}<br />"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: how to put hash key and value in order
by muba (Priest) on Dec 20, 2012 at 12:46 UTC | |
by starX (Chaplain) on Dec 20, 2012 at 17:36 UTC |