It looks like you've gotten some help, but no one told you that you don't need to open /etc/passwd, read each line, and split like that...
Something like this would do it:
$USERS{ $pwent[ 0 ] } = $pwent[ 4 ] while @pwent = getpwent();
perldoc -f getpwent
Update: Sigh. Zaxo beat me to it by a couple of minutes.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: /etc/passwd
by sauoq
in thread Building data structure from several /etc/passwd files
by tux242
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |