Click here to get back home

killing individual threads

 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
killing individual threads mastermagrath 01-26-2006
Get Chitika Premium
Posted by mastermagrath on January 26, 2006, 12:13 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
Killing threads March 10, 2006, 10:54 pm
Killing threads in perl March 9, 2006, 12:24 am
killing threads in perl March 9, 2006, 7:53 am
Killing threads in perl March 7, 2007, 9:44 am
How to get individual fields into variables using DBI? February 20, 2007, 11:25 pm
Accessing individual bits in a number May 19, 2008, 4:07 pm
Replacing every character in a string with individual tags September 10, 2007, 6:05 pm
Crypt::CBC vs individual cipher module differs? March 2, 2008, 7:01 pm
problem of copying individual worksheets in separate workbook June 26, 2007, 7:26 am
Split a multi-sequence file into individual files November 8, 2008, 10:22 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap