perl -i.old -ne 'my $l = <>; print($l), next if $.==2; print "$_$l" unless eof' input.txt