Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: heredoc and carriers return

by shawnhcorey (Friar)
on Oct 25, 2016 at 11:09 UTC ( #1174680=note: print w/replies, xml ) Need Help??


in reply to heredoc and Carriage return

Try:

my $win = << "__WIN__"; line 1\r line 2\r __WIN__

Using a double quote around the heredoc tag will cause the heredoc to be interpolated. That is, the "\r" will be interpolated as a CR (U+000D).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1174680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2021-10-26 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (91 votes). Check out past polls.

    Notices?