CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
.. A program to read through a dummy password file ...

 



foxy
Deleted

Aug 9, 2000, 1:11 PM

Post #1 of 2 (2027 views)
.. A program to read through a dummy password file ... Can't Post

Help !! I urgently need some pointers on a simple PERL program !! The prog. has to read through a dummy password file, that should output a list of usernames who are required to change their password.

Format of dummy file is :

username:password:dd/mm/yy:shell


ANY pointers would be gratefully received !!

THANX !!


Kanji
User / Moderator

Aug 9, 2000, 3:09 PM

Post #2 of 2 (2027 views)
Re: .. A program to read through a dummy password file ... [In reply to] Can't Post

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

open DUMMY, "/path/to/dummy" or die("Can't open dummy: $!";
while ( <DUMMY> ) {
chomp; # lose the \n
my ($user,$pass,$date,$shell) = split /:/;
print $user, "\n";
}</pre><HR></BLOCKQUOTE>

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives