Click here to get back home

IO::Socket::SSL : $sock is not defined if client is not SSL (crash)

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
IO::Socket::SSL : $sock is not defined if client is not SSL (crash) sgt_b2002 12-18-2005
Posted by sgt_b2002 on December 18, 2005, 11:26 am
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Posted by xhoster on December 19, 2005, 7:36 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
perl crash on sucking $socket into array January 6, 2005, 9:12 am
Naive Unix Socket client August 7, 2005, 5:08 am
Client socket programming eating up CPU/memory April 12, 2005, 6:31 am
sample client server socket issue March 6, 2008, 5:35 pm
POP3 Mail Client in PERL using IO::Socket module only and regular expressions April 11, 2006, 5:46 pm
short form for (defined $x and defined $y and ... )? March 25, 2006, 12:14 am
Crash in Perl_stashpv_hvname_match March 12, 2007, 8:25 pm
Sporadic crash during parsing April 7, 2006, 9:18 am
variables crash inside (?{}) May 2, 2006, 5:22 pm
odd crash in file upload via CGI July 31, 2006, 1:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap