Click here to get back home

Top in Google

 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
Top in Google Angelina 11-22-2005
Posted by Angelina on November 22, 2005, 4:35 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
###############GOOGLE MONEY Earn BILLIONS through GOOGLE Without Investment November 24, 2007, 1:29 am
Net::Google December 12, 2006, 5:55 pm
Google AdSense API January 29, 2005, 9:05 pm
google scraping March 17, 2006, 10:46 am
using Google API Spellchecker April 10, 2006, 3:20 am
google search July 9, 2007, 2:16 pm
How Google/Amazon/eBay use? October 3, 2004, 7:09 pm
Google Groups and indentations February 19, 2005, 9:51 am
Net::Google error handling March 7, 2005, 9:02 am
Google Groups and netiquette May 16, 2005, 12:47 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap