more useful options | |
PerlMonks |
Re^3: Replacing substrings within hash valuesby BillKSmith (Monsignor) |
on Mar 24, 2016 at 13:27 UTC ( [id://1158714]=note: print w/replies, xml ) | Need Help?? |
The main problem with your code is that you must read the entire IN file for each sequence. This would work if you rewind (seek IN, 0, 0) the IN file at the end of the sequence loop. This approach is very inefficient. Run-time would become unacceptable for larger files. Your use of last is fine for sequence I. For all other sequences, it would exit the loop before it gets to the processing. Use next instead.
Bill
In Section
Seekers of Perl Wisdom
|
|