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.
In reply to Re^3: Replacing substrings within hash values
by BillKSmith
in thread Replacing substrings within hash values
by K_Edw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |