This may be the code you are looking for, uses the .. flip-flop operator which is true when the first condition is satisfied then remains true until the itteration after the second condition is true. With the second condition here never going to be true it flips but dont flop !
#!/usr/local/bin/perl -w use strict; while (<DATA>) {&logit ($_)} sub logit { my $line = shift @_; $line =~ s/\0//g; return unless (/\S/..0); print $line } __DATA__ Some data Some more Some later data
Cheers,
R.
In reply to Re: blank lines up to a point
by Random_Walk
in thread blank lines up to a point
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |