Click here to get back home

process growing without limit

 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
process growing without limit Yakov 11-09-2007
Get Chitika Premium
Posted by Yakov on November 9, 2007, 12:55 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

Posted by Ben Morrow on November 11, 2007, 3:50 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
Discover Islam - The Fastest Growing Religion in the World ! July 4, 2008, 2:05 am
Parent process unable to read messages from child process February 28, 2007, 12:38 pm
Parent process unable to read messages from child process February 28, 2007, 12:38 pm
HoA bug? Size limit? November 17, 2006, 8:20 pm
array limit. December 18, 2006, 10:35 pm
Storable.pm size limit? October 6, 2004, 3:52 pm
There's no LIMIT to my SPLITting headache. June 11, 2005, 1:04 pm
Perl on freebsd: max memory limit? February 10, 2005, 7:25 am
how to limit system() execution time? May 22, 2005, 10:50 pm
Best way to limit results to the first 10 recieved from database March 5, 2006, 8:37 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap