Click here to get back home

Save your world

 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
Save your world opiam 11-25-2005
Get Chitika Premium
Posted by opiam on November 25, 2005, 8:21 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
LWP Doesn't Seem To Save Cookies: March 23, 2005, 2:14 am
IDE for Perl able to save as UTF-8 July 18, 2006, 6:23 am
how can u save ur money without tax..... November 19, 2007, 12:05 am
save to file problem November 23, 2005, 8:50 pm
save output to array February 22, 2006, 12:53 am
save image from url to file - how to? June 21, 2006, 9:49 am
Help: How to use filehandle to save files? August 16, 2007, 9:58 am
How to save/restore a hash of hashes? November 9, 2004, 2:34 am
go to a link, save the page and email it out? December 14, 2004, 10:49 am
How to go to a link and save a page and email it out? December 15, 2004, 9:18 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap