$ echo 'somedata data blah \ continuation of previous line \ another continuation of previous line \ stand alone line stand alone line multiple line \ continuation of multiple line' | perl -e' while ( <> ) { if ( s/\\\n// ) { $_ .= <>; redo; } print; } ' somedata data blah continuation of previous line another continuation of previous line stand alone line stand alone line multiple line continuation of multiple line