in reply to printing passwd file

I think you mean:

#!/usr/bin/perl # + + while ( my $user = (getpwent())[0]) { print $user,"\n"; }

/J\