in reply to Reading in a text file with "multi line lines"
Which prints:#!/usr/bin/perl -w use strict; $/ = ''; while (<DATA>) { next unless /\S/; chomp; s{\\\n}{}g; print "Line: ", $_,"\n"; } __DATA__ this is a good \ nice day but not a good nice \ night This is a test line This is a another test \ Line This is \ a final test line
Line: this is a good nice day but not a good nice night Line: This is a test line Line: This is a another test Line Line: This is \ a final test line
--
John.
|
|---|