OK.. I've gotten some of this to work.  If I take out the
"if..." line (and obviously one of the }'s) I get the entire
passwd file listed (listing done in another piece of code,
specifically the finger_succeeded subroutine).  So, why
doesn't this just filter out the lines that contain
$username?  I get nothing when I use a term that should be
found...

Thanks!

Alex

---code begins here----

sub search {
open(PASSWD, $pwfile) or die "Can't open the file : $!";
        while ( $line = <PASSWD> ) {
                if (m/.*($username)/i) {
                ($who, $rest) = split (/:/, $line, 2);
                @fields = $rest;
                $results{$who} = [ @fields ];
                }
        };
close(PASSWD);
&finger_succeeded;
}

_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to