$txt =~ s{(?<=[\w&;\\\-:\/])$nl\s*$nl(?=\s*[\w&;\\\-:\/])}{

}g if ( defined $nl ); $txt =~ s{(?<=[\w&;\\\-:\/])$nl(?=\s*[\w&;\\\-:\/])}{

}g if ( defined $nl );