Re: Heredocs with \r\n on linux

2017-10-16 Thread David Santiago
I'm implementing a network protocol that is line oriented (\r\n). I thought of : my $string = <<"END"; Hello\r World\r END but i don't know how a socket printing will work in windows (i don't have one to test it) I'm writing to the socket like this: print $socket $string Best regards, David S

Re: Heredocs with \r\n on linux

2017-10-15 Thread Rui Fernandes
Greetings I make...let's say, a lot perl executables for windows. In the case of outputing in a block - like it's the case - declaring the default output type, solves the CRLF problem. You missed the point... Just saying. Have a nice day.

Re: Heredocs with \r\n on linux

2017-10-15 Thread Kent Fredric
On 16 October 2017 at 12:21, Rui Fernandes wrote: > Hi > > Did you try to declare before all the code (right after the modules): > > print "Content-type: text/html\n\n"; > > ? > > Cheers > > I don't understand why this reply is here, or what you expect it does. That *looks* like you're doing HTT

Re: Heredocs with \r\n on linux

2017-10-15 Thread Rui Fernandes
Hi Did you try to declare before all the code (right after the modules): print "Content-type: text/html\n\n"; ? Cheers Kepler Sem vĂ­rus. www.avast.com

Re: Heredocs with \r\n on linux

2017-10-15 Thread Kent Fredric
On 16 October 2017 at 11:24, David Santiago wrote: > > Hi. > > How can i have \r\n on my heredoc string when i run my script in linux? > > my $text=<<"END"; > This is one line > This is another one > Final line > END > > When i print this var in my linux box, i get this: > "This is one line\nThis

Heredocs with \r\n on linux

2017-10-15 Thread David Santiago
Hi. How can i have \r\n on my heredoc string when i run my script in linux? my $text=<<"END"; This is one line This is another one Final line END When i print this var in my linux box, i get this: "This is one line\nThis is another one\nFinal line" However i want: "This is one line\r\nThis is