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).
In reply to Re: heredoc and carriers return
by shawnhcorey
in thread heredoc and Carriage return
by gabrielsousa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |