in reply to how to next line after the pattern in perl

replace

$. += 1;
with
$_ = <FF>