Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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 perusing the Monastery: (3)
As of 2017-06-23 04:43 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (534 votes). Check out past polls.