On Wed, 24 Oct 2001, Shannon Murdoch wrote: > I know how to print the contents of a hash, but what if I wanted to print > the keys themselves that the hash is called from (delimited by tabs)? > > This is how I print the contents of a hash (Thanks to Brett W. McCoy): > > %params = qw( > i01 4 > i02 5 > i03 2 > ); > > foreach (sort keys %params) { print "\t$params{$_}" }
The same way. $_ is the key for the hash element in the while loop. -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ Conscious is when you are aware of something and conscience is when you wish you weren't. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]