ulaksh has asked for the wisdom of the Perl Monks concerning the following question:
I need to put hash key and value in order without using Tie::Ixhash
#!/usr/bin/perl %coins = ( "Quarter" , 25, "Dime" , 10, "Nickel", 5 ); while (($key, $value) = each(%coins)){ print $key.", ".$value."\n"; }
output shown below need to put in order, please let me know how to do + that without using Tie::Ixhash Nickel, 5 Dime, 10 Quarter, 25
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how to put hash key and value in order
by frozenwithjoy (Priest) on Dec 20, 2012 at 03:01 UTC | |
Re: how to put hash key and value in order
by Athanasius (Archbishop) on Dec 20, 2012 at 02:56 UTC | |
by LanX (Saint) on Dec 20, 2012 at 03:01 UTC | |
Re: how to put hash key and value in order
by LanX (Saint) on Dec 20, 2012 at 02:52 UTC | |
Re: how to put hash key and value in order
by starX (Chaplain) on Dec 20, 2012 at 02:57 UTC | |
by muba (Priest) on Dec 20, 2012 at 12:46 UTC | |
by starX (Chaplain) on Dec 20, 2012 at 17:36 UTC | |
Re: how to put hash key and value in order
by BradV (Sexton) on Dec 20, 2012 at 12:45 UTC |