Sorry about that, the thing is that I am working with different scripts trying to figure it out what is going wrong, that's why the code needs "scrubbing" like you said
I don't know what else to give you, my problem is that I don't get to match my $passwordKey with any ofthe passwords from the array. I did double check space or blank in the string in case that was the reason of not matching, but nothing!
Here how I print the freq, which is not my main problem, it runs well in other script
foreach $key (sort by_score keys %frequency){
print OUTFILE "$key $frequency{$key}\n";
}
sub by_score
{
$frequency{$b} <=> $frequency{$a};
}