in reply to another problem with the blank line regex

I like using tr with the 'squash' option for these problems:
$lines =~ tr/\n//s;
<caveat> i don't do DOS</caveat> ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: (jeffa) Re: another problem with the blank line regex
by xtype (Deacon) on May 21, 2002 at 22:37 UTC
    i don't do DOS

    Why not?
    $lines =~ tr/\r//d; $lines =~ tr/\n//s; # or this? $lines =~ tr/\r?\n//s;
    I don't know how DOS newlines look, but wouldn't "\n\n" be "\r\n\r\n"?

    -xtype