(using strict and warnings should have prevented you)
and you need to increment it with ++$i within the loop.
As an alternative you could just test $. % 2 since $. automatically holds the line-number.
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re^3: find reverse complement of every 2nd line
by LanX
in thread find reverse complement of every 2nd line
by bingalee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |