Get group name : getgrent « System Functions « Perl






Get group name

     

#!/usr/bin/perl

use warnings;
use strict;

my @groups;
while (my $name = getgrent) {
    push @groups, $name;
}
print "Groups: @groups \n";

   
    
    
    
    
  








Related examples in the same category

1.The Perl function getgrent retrieves an item from the user group file.
2.Find all users without passwords?
3.getgrent function