in reply to Re^2: find reverse complement of every 2nd line
in thread find reverse complement of every 2nd line

variables in Perl need sigils, so it must be $i not just i

(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)