Click here to get back home

perl ftp problems

 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
perl ftp problems robt 02-15-2007
Posted by robt on February 15, 2007, 12:38 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
Problems with PERL CGI March 31, 2006, 5:17 pm
3 problems with perl. September 2, 2006, 1:35 pm
Problems with Perl 5.10 on Mac OS 10.5.2 March 21, 2008, 3:44 pm
Perl Script Problems January 24, 2005, 3:46 am
Problems Installing perl 5.8.7 November 9, 2005, 7:03 am
Problems Installing perl 5.8.7 November 9, 2005, 7:03 am
Problems after updating Net::SSH:Perl March 2, 2006, 10:56 am
Problems installing DBI module on perl August 9, 2004, 10:40 am
problems with Perl RegEx match December 27, 2004, 5:07 pm
Perl and SMTP mail problems June 23, 2005, 5:12 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap