[JaxPM] syslog analyzing

Nate nate at campin.net
Fri Apr 7 17:56:03 CDT 2000


On the jacksonville-pm-list; Jax.PM'er Nate <nate at campin.net> wrote -

Bill,

Am I missing something? I don't see where it tells you how to use each on
each of a _list_ of hashes.

My code was like this pseudocode:

foreach $hash (in list of %hases)
 	while (($key, $val)=(each $hash)) {
		# do something to/with the hash that $hash references;
	}
}

I get errors about how the argument to each() must be a hash, not a scalar
dereference. 

I want to iterate over a list of hashes so I don't have to cut and paste
the same while loop for each hash. There must be a way to do this.


--
Nate Campi           nate at campin.net 
my infosec favorites: www.campin.net


Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list