Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Not in order in Hash output

by perl_walker (Novice)
on Oct 11, 2012 at 12:34 UTC ( #998432=note: print w/ replies, xml ) Need Help??


in reply to Re: Not in order in Hash output
in thread Not in order in Hash output

Try this,

use strict; use warnings; use Tie::IxHash; my %hash1 = (); tie %hash1, "Tie::IxHash"; %hash1 = ("a",1,"b",2,"c",3,"d",4); while (my@values = each(%hash1)){ print "The key/value pair is @values \n"; }


Comment on Re^2: Not in order in Hash output
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (18)
As of 2015-07-07 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (92 votes), past polls