in reply to next if loop
I'd like to recommend getpwnam for this. Here we get a HoA keyed on user names, containing all the user info for each listed username.
That eliminates all the fuss with the passwd file, to the benefit of portability.my %users = map { $_ => [ getpwnam $_ ] } qw( adrian adm sys alcatel );
After Compline,
Zaxo
|
|---|