The final .* doesn't match the \n at the end of $data_line, so that doesn't get removed (perlre). One approach you can use is to add the /s modifier to the regex, so that . matches the newline. Obviously TMTOWTDI - personally I'd just make the printing of the lines conditional:
print $data_line unless $data_line=~/^[BbLl].*|^_.*|^.*\d\d\d\.\d\d\d.*/;
In reply to Re: Remove blank lines from REGEX output
by Anonymous Monk
in thread Remove blank lines from REGEX output
by Deep_Plaid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |