The Perldoc (found out I can only use it under Windows, which I have running under an emulator) says this about keys:
The keys are returned in an apparently random order. The actual random order is subject to change in future versions of perl, but it is guaranteed to be the same order as either the "values" or "each" function produces (given that the hash has not been modified). As a side effect, it resets HASH's iterator. So I take it there is no way to list all the keys contained in a hash in the same order they were entered in, like I can with a normal array? -Shannon > From: [EMAIL PROTECTED] (Rafal Pocztarski) > Newsgroups: perl.beginners.cgi > Date: Wed, 24 Oct 2001 16:04:19 +0200 > To: [EMAIL PROTECTED] > Subject: Re: Printing Hash Keys > > Shannon Murdoch wrote: >> >> What everyone has said so far is ways to list all the VALUES contained in a >> hash array, what I need to do is list all the KEYS contained in the hash >> array-with a tab (\t) between each. > > print join "\t", sort keys %hashname; > > - RaFaL Pocztarski, [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]