in reply to remove blank lines with regex
There isn't the s flag for the first regex. This will prevent the second from ever being run. For that matter, you can replace the entire while(){} with this regex:
$lines =~ s/\n+/\n/gs;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: remove blank lines with regex
by perlplexer (Hermit) on May 21, 2002 at 13:22 UTC |