in reply to simple wordlist password test

I think you might be running into trouble at:
@list = <PASSF>;

I think this will put all user input up to and including the newline into a scalar that is the first entry of your array. You might want to try something like this:
my $User_Entry = <PASSF>; my @list = split(/ /, $User_Entry); . . .
I also highly recommend the use of
use strict; use warnings;
and even use diagnostics; They can be very helpful.

Another device that can help out a lot is to use print statements to verify that variables contain what you think they do. use Data::Dumper; can also help you know what is in a data structure.

Replies are listed 'Best First'.
Re^2: simple wordlist password test
by tlm (Prior) on Jun 21, 2005 at 14:31 UTC

    I think this will put all user input up to and including the newline into a scalar that is the first entry of your array.

    PASSF is a handle to a file (whose name, along with a newline, is obtained from STDIN). The array @list receives all the lines in this file, one line per array member.

    the lowliest monk