Strange, I've been using:
foreach (sort keys %params) { print "\t$params{$_}" }

to get the list of data out of a hash....

Thanks for all your help Brett,
-Shannon


> From: [EMAIL PROTECTED] (Brett W. McCoy)
> Newsgroups: perl.beginners.cgi
> Date: Wed, 24 Oct 2001 09:57:09 -0400 (EDT)
> To: Shannon Murdoch <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: Re: Printing Hash Keys
> 
> On Wed, 24 Oct 2001, Shannon Murdoch wrote:
> 
>>>> foreach (sort keys %params) { print "\t$params{$_}" }
>>> 
>>> The same way.  $_ is the key for the hash element in the while loop.
>> 
>> 
>> I want a list of keys, not their values though.
> 
> Right -- the 'keys' function extracts the list of keys from a hash.  See
> the perldoc on it.
> 
> -- Brett
> http://www.chapelperilous.net/
> ------------------------------------------------------------------------
> Trying to establish voice contact ... please ____yell into keyboard.
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to