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;
}