You didn't show enough code & data to be able to say for sure. But one thing occurs to me: Perhaps you've got blank lines in @plines, so you're asking for characters after the end? Try inserting the following line as the first line in your inner loop to check:
print '"',$pline,'": len=',length($pline),"\n";
--roboticus
In reply to Re: substr in nested foreach loop
by roboticus
in thread substr in nested foreach loop
by sarani
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |