The only times $val is assigned to it is conditional upon the input and at no point are you resetting the value of $val, therefore if the first line matches and no further lines do then $val will retain the same value and @outlines will be populated with identical values.
/J\
In reply to Re: print to output problem
by gellyfish
in thread print to output problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |