home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / languages / perl / nutshell / ch5 / useriter.eg < prev    next >
Encoding:
Text File  |  1992-10-18  |  230 b   |  12 lines

  1. setpwent;
  2. while (@user=getpwent) {
  3.     ($name,$passwd,$uid,$gid,$quota,$comment,
  4.     $gcos,$dir,$shell) = @user;
  5.     if (-e "$dir/.rnlast") {
  6.     print "$name has used RN";
  7.     print " recently" if -M _ < 7;
  8.     print "\n";
  9.     }
  10. }
  11. endpwent;
  12.