develooper Front page | perl.beginners | Postings from December 2002

printing hash

Thread Next
Duarte Cordeiro
December 5, 2002 06:16
printing hash
Message ID:

 I have some data in a hash table, and I would like to print it in the
same order as I created it. According to the user manual, "the result of
foreach $key (keys %hash) is random-like". I tried it, and :) its true.

Any way I can print it like I want ?

I need to print in the same order as I construct the hash:

my %EmpVars=("id",                                     ["number",1,1],
      "General Information:.title",                    ["string",0,""],
      "General Information:.Job Position",             ["string",0,""],
      "General Information:.Access Policy:.specify",   ["privacy",0,1],
      "Content Development:.functionalArea",           ["string",0,""],
      "Content Development:.location",                 ["string",0,""],

Thanks in advance, 

  Duarte Cordeiro

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About