in reply to simple wordlist password test

You're not very clear as to what you are attempting to do. Judging from the prompts in the code, you want to read a file containing encrypted passwords and check them against a dictionary. But that's not what this code will do.

If you have a file contaning the encrypted passwords, you use the salt of these passwords to encrypt the words from your list. You don't need a salt from the user.
You could use something along these lines:

open WORDS, "<", "wordlist" or die $!; chomp ( my @words = <WORDS> ); close WORDS or die $!; open PWFILE, "<", "passwordfile" or die $!; while ( <PWFILE> ) { chomp; foreach my $word ( @words ) { if crypt($word, $_) eq $_ { print "password is $word!\n"; last; } } } close PWFILE or die $!;
HTH,

Paul