Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a line like this...
print DESTINATION "old: $_new: $line\n";
Where $_ and $line are strings with a \n on the end that I want to write to the file.
Obviously $_new won't work, but neither will $_\new because it treats \n as a newline. Does anybody know of a better way to do it, "old: $_"."new: $line\n" seems bodgy.
Ta.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Interpolation question
by Ovid (Cardinal) on May 24, 2001 at 20:13 UTC | |
|
Re: Interpolation question
by virtualsue (Vicar) on May 24, 2001 at 21:01 UTC | |
|
(tye)Re: Interpolation question
by tye (Sage) on May 24, 2001 at 23:08 UTC | |
|
Re: Interpolation question
by srawls (Friar) on May 24, 2001 at 22:33 UTC |