Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

RE: RE: hashes

by jrsmith (Pilgrim)
on May 31, 2000 at 21:58 UTC ( #15662=note: print w/ replies, xml ) Need Help??


in reply to RE: hashes
in thread hashes

i need the values to be printed out in that exact order, and if i didn't specify the keys they would be random..


Comment on RE: RE: hashes
Replies are listed 'Best First'.
RE: RE: RE: hashes
by KM (Priest) on May 31, 2000 at 22:02 UTC
    print OUT $hash{key1}; print OUT $hash{key2}; etc...

    If you want them in a specific order, use them in that specific order. Or do something like:

    my @keys = ('one', 'two', 'three'); for (@keys) { print OUT $hash{$_}; }

    Then, you have already predetermined your order, and can add/change it at any time.

    Cheers,
    KM

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://15662]
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