I wasn't looking for portability across platforms, I was looking for something to work on multiple remote hosts. Unless I rework the script into a client-server design, this still doesn't look like it'll work for me. As it stands (and for simplicity sake), I'm cating /etc/passwd over ssh, and parsing what is returned.
-s.
Comment on Re: Re: SCALAR output instead of attribute name.
With ssh or scp, you can send your portable script to your account on each host. Then when you want to poll hosts for their user accounts, ssh -2 user@host ./myscript.pl for each host in your polling script.
No client/server involved but portability matters.