The stupid question is the question not asked | |
PerlMonks |
Re: help regarding command line argumentsby roboticus (Chancellor) |
on Nov 18, 2014 at 12:35 UTC ( [id://1107563]=note: print w/replies, xml ) | Need Help?? |
When you use "\n" in a string in your script, perl converts the "\n" into the newline character. But you don't want perl to automatically do that in data, 'cause sometimes you really want the characters "\" and "n". When you pass data into your script, perl assumes the data is what you want, so it doesn't touch it. So if you want the "\n" converted into a newline, just tell perl to do the conversion for you, like so:
Which gives me this when I run it:
...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|