|
|
| Think about Loose Coupling | |
| PerlMonks |
Remove new line characters from PCL fileby coco (Initiate) |
| on Jan 16, 2009 at 16:55 UTC ( [id://736874]=perlquestion: print w/replies, xml ) | Need Help?? |
|
coco has asked for the wisdom of the Perl Monks concerning the following question:
I have the following line of text in my script $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
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||