use Tie::IxHash module from CPAN, to preserve order in a Hash.

Regards,
Edward WIJAYA
SINGAPORE

On Tue, 09 Nov 2004 03:06:03 +0800, Edward Wijaya <[EMAIL PROTECTED]> wrote:

On Mon, 8 Nov 2004 11:59:13 +0100, Ing. Branislav Gerzo <[EMAIL PROTECTED]> wrote:

Hi pals,

I have simple hash question, lets we have example code:

my %hash = ( 1 => 2, 2 => 3, 3 => 4, 4 => 5 );
while (my($key, $value) = each(%hash)) { print "$key => $value\n"; }

how I can print all values, if I want print that in this order:
2 => 3
4 => 5
3 => 4
1 => 2

thanks for any ideas.

--

 --. ,--  ,-     ICQ: 7552083      \|||/    `//EB: www.2ge.us
,--' |  - |--    IRC: [2ge]        (. .)    ,\\SN: 2ge!2ge_us
`====+==+=+===~  ~=============-o00-(_)-00o-================~
Second childhood?  I haven't finished the first one.










-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to