in reply to Foreach on an array (of hashes)

Your problem is that $_{PID} is accessing an element of the hash %_. $_ is a reference to an anonymous hash, so $_->{PID} is what you want.

--
Ryan Koppenhaver, Aspiring Perl Hacker
"I ask for so little. Just fear me, love me, do as I say and I will be your slave."