Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: newlines in regular expressions

by eyepopslikeamosquito (Archbishop)
on Dec 07, 2004 at 07:22 UTC ( [id://412848] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    perl -p -e 'BEGIN { undef $/ } s/\n{2,}/\n/g'
  2. or download this
    perl -p0777e 's/\n{2,}/\n/g'