in reply to Re^2: Print to specific line
in thread Print to specific line
Hm, can't agree, really. I think he needs an array because he said the line numbers are important.
If you use a sorted hash then the output file will only contain lines for the strings he has, and if there are any sequential numbers missing from the input, then the output file will not meet the specs.
(I do agree that you could put the data into an array as you split the input lines, skipping the hash. But I didn't want to clutter my example with code for splitting the input, as he said he has the strings and the line numbers already).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Print to specific line
by fishmonger (Chaplain) on Jun 23, 2015 at 18:46 UTC | |
by GotToBTru (Prior) on Jun 23, 2015 at 19:01 UTC | |
|
Re^4: Print to specific line
by Laurent_R (Canon) on Jun 23, 2015 at 19:03 UTC |