Larry Moore wrote:
> 
> I want to slurp a file and make multiple blank lines into single blank
> lines. Here is my code:
> 
> [snip code]
> 
> I have tried a number of substitutions but haven't found the correct
> formulation.


#! perl -w
use strict;

my $file = 'test.fmt';

open IN, $file or die "Cannot open $file: $!";
open OUT, '>> test.txt' or die "Cannot open test.txt: $!";

print OUT "$file\n\n";
{
  local $/ = '';  # paragraph mode
  print OUT <IN>;
}
close IN;
print OUT '******************';
close OUT;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to