List users : getpwent « System Functions « Perl






List users

      
#!/usr/bin/perl

use warnings;
use strict;

my @users;
while (my $name = getpwent) {
    push @users, $name;
}
print "Users: @users \n";

   
    
    
    
    
    
  








Related examples in the same category

1.Print out all users on your UNIX system
2.Read the password file