in reply to Re: replacing blank lines
in thread replacing blank lines
That should leave $entire_file with only nonblank lines
This is assuming that blank lines are TRUELY blank (no spaces). This is more general:
perl -pi -e 's!^\s+?$!!' file.txt or s!^(\n|\s+)$!!g
Cheers,
KM
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: replacing blank lines
by merlyn (Sage) on Mar 06, 2001 at 05:39 UTC | |
Re: Re: Re: replacing blank lines
by chipmunk (Parson) on Mar 06, 2001 at 08:20 UTC |