in reply to Matching values in array

How do you print the hash with freq?

Why don't you show us more code, as it's hard to tell if you've gone wrong in the loop you left off.

...On further review, your code needs scrubbing. For instance, you have

open(PFILE, "Activatepasswords.txt")|| die "Cannot open patterns1.txt +file";
If the open fails, your error message reports on a different file?

You'll get better answers if you clearly state the problem, and reduce the code to the minimal set that repeats the symptoms.

Sorry I couldn't be more helpful, it's bobos for me.

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re: Re: Matching values in array
by Anonymous Monk on Mar 02, 2004 at 05:37 UTC
    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}; }