where the regex matches lines which start with a newline chartacter. If you also wanted to ignore lines which contained only spaces you could try replacing the regex line with#!/usr/bin/perl -w use strict; while (<>) { next if (/^\n/); print; }
next if (/^\s*$/);
In reply to Re: removing blank lines from files
by Bilbo
in thread removing blank lines from files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |