Click here to get back home

SSH2 exceptions on windows xp (perl 5.8.8)

 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
SSH2 exceptions on windows xp (perl 5.8.8) gil 10-01-2007
Posted by gil on October 1, 2007, 7:06 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
Net:SSH::Perl hangs while logging into SSH2 server January 13, 2006, 10:19 am
Net::SSH2 - Authentication without a password? May 14, 2007, 3:31 pm
Chained exceptions in Perl May 4, 2007, 4:44 am
Trapping Perl divide-by-zero exceptions using eval( ) August 27, 2004, 9:25 am
perl exceptions and return value in finally block November 7, 2006, 10:26 pm
'stat' and it's exceptions November 8, 2004, 9:24 pm
database connect: protect with exceptions? September 18, 2006, 4:25 pm
Finding out the String-based Exceptions for a Module? December 12, 2006, 1:42 am
windows program return values vs perl return values from a call to system() -- windows post only October 29, 2005, 6:22 pm
PERL can't open file for logging (world writable directory Windows XP Home/ Active Perl / Apache) November 8, 2006, 5:50 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap