Welcome to the monastery.
To be honest, there's a lot in that script preventing it even from compiling. It might be best if you could just write a new script which simply manages to open the file correctly, read each line and print each line. Once you have that, save it. Then as you modify it at each step to add extra processes, test it, and if it fails, keep refining your addition until it works.
Good luck.
In reply to Re: Parsing multi-line record with varying data
by hippo
in thread Parsing multi-line record with varying data
by VoidWander
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |