You are creating a lexically-scoped variable @line_no within your while() loop with this:
push (my @line_no, $.);
Should be
push (@line_no, $.);
as per the elsif() later within the block.
In reply to Re: Picking up information coming out of a loop
by slife
in thread Picking up information coming out of a loop
by jonnyfolk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |