#!/usr/local/bin/perl open (FILE, "/home/robert/Print/foo") || die "Cant open /home/robert/f +oo\n\n"; # Create a file array of lines while ($line = <FILE>) { push (@array, $line); } # Then control the output foreach $index (@array) { # if the line is completely blank dont print it. if ($index !~ /^\s*\n\s*$/) { print "$index"; } }
In reply to Re: replacing blank lines
by kleinbiker7
in thread replacing blank lines
by indapa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |