Hi all
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?
Thanks.
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?
Thanks.