in reply to Re^2: use getpwent to find users and delete them
in thread use getpwent to find users and delete them
I think getpwent expects no parameter. It's unfortunate that it (or Perl) doesn't say so...
Changing your code to use getpwnam instead works for me:
my ( $uid ) = getpwnam($account);
In Section
Seekers of Perl Wisdom