in reply to find reverse complement of every 2nd line

Looking at the sample, you want the reverse complement of the second line, plus four, plus four... You can use $. which keeps the line number and the modulus operator %:
use feature 'say'; while (<>) { chomp; if ($. % 4 == 2 ) { $_ = reverse; y/ACTG/TGAC/; } say; }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ