in reply to Re: Iterate over multiple data
in thread Iterate over multiple data

My output (given that I compute AP for hyper) should be like the following:

acacia-n hyper 1 ant-n hyper 1 apricot-n hyper 1

Basically, for each different element of the first row of data I submitted as input, I should repeat the calculations my code does. The only problem I have is that I don't know how to make the code iterate only while acacia, and do the calculations on that data, then do them only for ant, and then do them only for apricot.
I hope I made it a little clearer.
Thanks again,
Giulia

Replies are listed 'Best First'.
Re^3: Iterate over multiple data
by JavaFan (Canon) on Mar 08, 2012 at 19:10 UTC
    Seems you want to use a hash, keyed on $u where you can keep track of the different values you need.