Thanks everybody .. moving the $currentpos update out of the if fixed it beautifully.
To answer one question, the record length is always 4 chars in length and as for the other suggestions they're very much appreciated but I've only been writing perl for a couple of days so my scripts are going to be a little amateurish at this stage - does the job though :)
Cheers!
In reply to Re^2: Can someone tell me why this hangs??
by monty77
in thread Can someone tell me why this hangs??
by monty77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |