15 lines
274 B
Perl
15 lines
274 B
Perl
#!/usr/bin/perl
|
|
|
|
use warnings;
|
|
use strict;
|
|
|
|
use Text::ParseWords;
|
|
|
|
my (@users, @fields);
|
|
if (open PASSWD,"/etc/passwd") {
|
|
@users = <PASSWD>;
|
|
chomp @users; # remove linefeeds
|
|
@fields = quotewords(':', 0, @users);
|
|
close PASSWD;
|
|
}
|
|
print "@fields"; |