programming-examples/perl/SystemFunction/File group listing.pl
2019-11-15 12:59:38 +01:00

13 lines
303 B
Perl

#!/usr/bin/perl
use warnings;
use strict;
use User::grent qw(:FIELDS);
while (my $group = getgrent) {
print 'Name : ', $gr_name, "\n";
print 'Password: ', $gr_passwd, "\n";
print 'Group ID: ', $gr_gid, "\n";
print 'Members : ', join(', ', @{$group->members}), "\n\n";
}