Read password : Text « System Functions « Perl






Read password

      

#!/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";

   
    
    
    
    
    
  








Related examples in the same category

1.Get abbreviations
2.use Text::Abbrev;
3.use Text::Tabs to set the tab size
4.Soundex function