develooper Front page | perl.beginners | Postings from June 2003

Re: duh RE: help sending hex EOL chars

Thread Previous
From:
Kevin Pfeiffer
Date:
June 24, 2003 13:15
Subject:
Re: duh RE: help sending hex EOL chars
Message ID:
1064059.P7FbQ7W3GP@sputnik.tiros.net
In article <DA5E76C21FEA85459B0E959CFAC237820289C540@sisexpo01.sis>, 
Christopher X66156 McMahon wrote:
[top post moved down]

>> -----Original Message-----
>> From: McMahon, Christopher x66156
>> Sent: Tuesday, June 24, 2003 10:35 AM
>> To: 'beginners@perl.org'
>> Subject: help sending hex EOL chars
>> 
>> 
>> Hi...
>>     My TCP/IP server is printing input fine, now I'm trying to send the
>> right output.
>>     The client for my server expects an EndOfLine character that is a hex
>> 0D0A.  (zero-dee-zero-ay) My code is doing this:
>>  
>> my $eol = "\x{0D0A}";
[...]

> Answering my own question:
>  
> my $eol = "\r\n";
>  
> \r\n becomes 0D0A.
>     -C

I don't know what module(s) you are using, but this reminds me of an article 
by Randall Schwartz I saw today that talks about IO::Socket::INET. It (for 
example) has an EOL method (CRLF) which he recommends as being more 
portable. There was also a picture. It's clear to me that as with radio 
djs, photographs of Perl gurus just get in the way of the virtual image we 
carry in our minds. ;-))

-- 
Kevin Pfeiffer
International University Bremen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About