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