[Chicago-talk] Replacing consecutive newlines with a single newline

Steven Lembark lembark at wrkhors.com
Fri Sep 26 14:39:13 PDT 2008


>> This can also be written as
> 
>      perl -n -e 'print if /./'
> 
> or - fore! [1]:
>      perl -p -e 'next if /^$/'
> 
> drat, no shorter.

Can't win 'em all :-)

-- 
Steven Lembark                                            85-09 90th St.
Workhorse Computing                                 Woodhaven, NY, 11421
lembark at wrkhors.com                                      +1 888 359 3508


More information about the Chicago-talk mailing list