printsmy @array = <DATA>; chomp; for my $array (@array){ $array =~ s/\n$// if ($array !~ /;[^;]*;/) && ($array =~ /^\w/); $array =~ s/^\s*([^\s])/$1/; } print @array; __DATA__ The Road Ahead1;Completely Revised and Up-to-Date; 002564418 road ahead2; America?~@~Ya creeping revolution;00345678 The road ahead3;[Address made before the Regional Foreign Policy Conference; 004561963
The Road Ahead1;Completely Revised and Up-to-Date; 002564418 road ahead2; America’a creeping revolution;00345678 The road ahead3;[Address made before the Regional Foreign Policy Confe +rence; 004561963
In reply to Re: join two lines in a file?
by olus
in thread join two lines in a file?
by happyrainb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |