Front page | perl.beginners |
Postings from December 2002
printing hash
Thread Next
From:
Duarte Cordeiro
Date:
December 5, 2002 06:16
Subject:
printing hash
Message ID:
0DA607347A46F649BA80F49ABAE83FE48E16B4@ptoermxs01.neoris.cxnetworks.net
Hi,
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 ?
Example:
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
-
printing hash
by Duarte Cordeiro