Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: each() function used in associative arrays gives incorrect unordered output.

by uwevoelker (Pilgrim)
on Jan 19, 2002 at 13:30 UTC ( #140068=note: print w/replies, xml ) Need Help??


in reply to each() function used in associative arrays gives incorrect unordered output.

If you want ordered output you could use
foreach my $key (sort(keys %array)) { print "$key = $array{$key}\n"; }
  • Comment on Re: each() function used in associative arrays gives incorrect unordered output.
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2022-05-25 17:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?