coco has asked for the wisdom of the Perl Monks concerning the following question:
$var = do {local $/; <$FILE>};#<-- slurp whole file in scalar
The problem i am having is that the input file is a pcl file and has new line characters in the middle of a line. When the perl script is evaluating each line it meets this new line character and outputs it onto a new line which affects the final print.
Can anyone tell me how to assign the text to the $var variable without evaluating the new line character?
maybe using the ':raw' command would that work? or can someone describe how to use it?
Thanks
Co
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove new line characters from PCL file
by JavaFan (Canon) on Jan 16, 2009 at 16:58 UTC | |
by Anonymous Monk on Jan 16, 2009 at 17:18 UTC | |
by gone2015 (Deacon) on Jan 16, 2009 at 18:17 UTC | |
by ikegami (Patriarch) on Jan 16, 2009 at 17:31 UTC | |
by andye (Curate) on Jan 16, 2009 at 17:31 UTC | |
|
Re: Remove new line characters from PCL file
by CountZero (Bishop) on Jan 16, 2009 at 17:18 UTC |