Click here to get back home

easy money-making

 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
easy money-making laxboye226 08-01-2005
Get Chitika Premium
Posted by laxboye226 on August 1, 2005, 9:27 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
Easy One I'm Sure. February 10, 2006, 10:25 am
Perl on the Pocket PC - Easy! November 21, 2004, 11:00 pm
Quick easy question... December 14, 2004, 8:57 am
Quick and Easy Money February 10, 2005, 2:03 pm
LWP: Any Easy Way to Use Relative Links? March 22, 2005, 12:14 am
Parse a filename (this SHOULD be easy, right?) December 14, 2005, 5:12 pm
easy way to make money March 21, 2006, 9:39 am
Fast and Easy Money October 10, 2007, 4:28 pm
Tie::IxHash::Easy with "eval()" February 5, 2008, 7:07 pm
Using WWW::Curl::Easy with Perl July 21, 2008, 9:21 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap