Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^3: frequency strings 2 files

by ig (Vicar)
on Jul 06, 2012 at 04:55 UTC ( #980208=note: print w/replies, xml ) Need Help??

in reply to Re^2: frequency strings 2 files
in thread frequency strings 2 files

In @hash{@lines2} you are referring to the hash %hash which you haven't initialized, so %hash2 would end up empty if your program ran - but it doesn't because of other errors, as you may know.

If your book hasn't shown you @hash{@array} and you are not sure what it means or how to use it, you might be better off solving your problem some other way. There are many ways to solve the problem. I don't see a need for %hash2 myself, nor even for @lines2. Rather than reading all the lines from file 2 into an array then puting the values into a hash, you can read all the lines in a while or foreach loop and deal with them one at a time: "in the given order".

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://980208]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2018-03-22 14:42 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (276 votes). Check out past polls.