in reply to use getpwent to find users and delete them
If you use system LIST with the list having more than one element, then your command line arguments need to be separate elements, otherwise you're currently trying to run a program named literally "sudo /usr/sbin/userdel". Try my @cmd = ("sudo", "/usr/sbin/userdel", "-r", $account);.
|
---|
In Section
Seekers of Perl Wisdom