in reply to removing blank lines from files
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*$/);
|
|---|