Gavin has asked for the wisdom of the Perl Monks concerning the following question:
Key Value 12 First line of text 25 Second line of text 34 Third line of textAn array @scoreWords holds a list of special words. I would like to increase the score held in each Key by $y for each occurrence of any of the special words on each line.
Key Value 1 First line of text 2 Second line of text 3 Third line of textI would like to use the sorted key scores from the first hash to find the highest scoring lines of text in the second hash by their line numbers.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Increasing key/values held in a Hash from an Array
by ikegami (Patriarch) on Mar 17, 2006 at 21:21 UTC | |
|
Re: Increasing key/values held in a Hash from an Array
by xdg (Monsignor) on Mar 17, 2006 at 21:33 UTC | |
|
Re: Increasing key/values held in a Hash from an Array
by fizbin (Chaplain) on Mar 17, 2006 at 21:36 UTC | |
by Gavin (Archbishop) on Mar 17, 2006 at 23:52 UTC | |
|
Re: Increasing key/values held in a Hash from an Array
by leocharre (Priest) on Mar 17, 2006 at 21:42 UTC | |
by ikegami (Patriarch) on Mar 17, 2006 at 22:03 UTC |