in reply to Re: Remove return on multiple lines between 2 characters
in thread Remove return on multiple lines between 2 characters

paragraph mode ... local $/ = "\n\n";

Just wanted to point this out from $/:

Setting it to "\n\n" means something slightly different than setting to "", if the file contains consecutive empty lines. Setting to "" will treat two or more consecutive empty lines as a single empty line. Setting to "\n\n" will blindly assume that the next input character belongs to the next paragraph, even if it's a newline.

Replies are listed 'Best First'.
Re^3: Remove return on multiple lines between 2 characters
by shmem (Chancellor) on Jul 19, 2017 at 11:00 UTC
    Just wanted to point this out from $/:

    Good point! But irrelevant in this case, since all newline characters are removed from the matching paragraph. So even if there were multiple leading "\n" characters per record, the output would be the same.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'