$i = 2; $j = 4; print "$_\n" for ($i..$j);
Output:
2 3 4
Update: I missed what was obvious to choroba. Not so much a flip-flop as a filter:
# show lines 2 thru 4 while (<>) { print if 2..4 } # this will print every line $i = 2; $j = 4; while (<>) { print if $i..$j }
In reply to Re: flip-flop interpolation
by GotToBTru
in thread flip-flop interpolation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |