Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

RE: hashes

by neshura (Chaplain)
on May 31, 2000 at 21:55 UTC ( [id://15661]=note: print w/replies, xml ) Need Help??


in reply to hashes

is there a reason you can't just do
foreach $value3 (keys %import_values) { print TEMP ("\"$value3\","); }
i've never seen anyone use that hash construct you've got in the foreach, but i'm a relative newbie...

e-mail neshura

Replies are listed 'Best First'.
RE: RE: hashes
by jrsmith (Pilgrim) on May 31, 2000 at 21:58 UTC
    i need the values to be printed out in that exact order, and if i didn't specify the keys they would be random..
      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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://15661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-28 16:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found