Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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
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 romping around the Monastery: (11)
As of 2014-08-27 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls