in reply to Subroutine arguments problem

Change sub queryProcesses($server) { to the following two lines and it should work:
sub queryProcesses { my ($server)=@_;
When you pass variables to a sub, they are in @_, and you're never getting them out with your code. I'm sure another monk can give you a better explanation, but that's how I understand it. -DJCP