|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re^5: help with splitting and printing the arrayby blindluke (Hermit) |
| on Jan 25, 2015 at 12:41 UTC ( [id://1114430]=note: print w/replies, xml ) | Need Help?? |
|
If it doesn't help, then it's only simple, not a solution. You should not suggest a split / field index based method when it is clear that the field indexes and their order might easily change, due to the (known) nature of the input data. Especially since this potential problem has already been pointed out to the OP. As to error checking - it's not an 'improvement', it's a necessity. It's obvious that before the OP uses this in production code, he should check for possible error, both upon matching and upon opening his input file. - Luke
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||