Click here to get back home

To destroy thread in perl

 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
To destroy thread in perl rajendra 03-09-2007
Posted by rajendra on March 9, 2007, 1:14 am
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
DESTROY isn't called June 23, 2006, 12:33 pm
Losing value of $@ ($EVAL_ERROR) on DESTROY March 13, 2006, 1:00 pm
Problem starting a new thread from another thread July 25, 2006, 7:18 pm
hi,something about thread in perl November 16, 2004, 2:04 pm
perl thread question March 22, 2005, 7:01 pm
a little different thread (about jobs and perl) October 12, 2005, 1:45 pm
creating thread in PERL June 5, 2006, 12:02 am
How to kill a perl thread October 16, 2006, 1:26 pm
Perl thread question February 16, 2007, 12:19 pm
Thread safety Tips in perl December 13, 2004, 11:49 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap