On Thu, 2008-08-14 at 02:15 -0700, [EMAIL PROTECTED] wrote:
> # It's supposed to read first username from user.txt
> # and try it against all the passwords from pass.txt,
> # and then to move to the next username and run that
> # against all the passwords, too, and so on...but it
> # does not work that way..it just check passwords
> # against the first username and then exits. What's
> # the problem?

There is no problem.  The program reads the file once.  Then, since it
is at the end-of-file, skips the inner loop.

There are three things you can do:

1.  Close the file and re-open it in the outer loop.

2. Rewind the file; see `perldoc -f seek`.

3. (The recommended choice)  Read the passwords into an array.


-- 
Just my 0.00000002 million dollars worth,
  Shawn

"Where there's duct tape, there's hope."

"Perl is the duct tape of the Internet."
        Hassan Schroeder, Sun's first webmaster


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to