Hi Durate - I've never used these, but I'll bet one of them works for you:
Tie-InsertOrderHash-0.01: insert-order-preserving tied hash [ download / quickinstall ] CPAN directory: B/BI/BINKLEY (B. K. Oxley (binkley)) Category >> Data Type Utilities >> Tie ---------------------------------------------------------------------------- ---- Tie-IxHash-1.21: ordered associative arrays for Perl [ download / quickinstall ] CPAN directory: G/GS/GSAR (Gurusamy Sarathy) Category >> Data Type Utilities >> Tie As far as I know, there is no easy core-perl way to do what you want, hence the CPAN modules. Aloha => Beau. -----Original Message----- From: Duarte Cordeiro [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 4:16 AM To: [EMAIL PROTECTED] Subject: printing hash 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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]