my $file = do { local $/; <DATA> }; $file =~ s/\n(?!A\d+\.)/ /g; $file .= "\n"; print $file; __DATA__ A6.8.5 This is an example sentence A6.8.6 This is an example sentence
A6.8.5 This is an example sentence A6.8.6 This is an example sentence
In reply to Re^3: How to remove extra line breaks (using regexp)?
by ikegami
in thread How to remove extra line breaks (using regexp)?
by larus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |