#!/usr/bin/perl use strict; my @file = <DATA>; foreach my $i (@file) { $i =~ s/\n/ /; $i =~ /^A\d\.\d\./ ? print "\n$i" : print $i; } __DATA__ A6.8.5 This is an example sentence A6.8.6 This is an example sentence
In reply to Re: How to remove extra line breaks (using regexp)?
by bichonfrise74
in thread How to remove extra line breaks (using regexp)?
by larus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |