my $pattern = qr{ \s* \n \s* \s* \n }x;