Click here to get back home

perl execution speed

 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
perl execution speed surfunbear 04-20-2005
Get Chitika Premium
Posted by surfunbear on April 20, 2005, 2:43 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 J. Gleixner on April 20, 2005, 6:42 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
How big a part does hardware play in script execution speed? October 6, 2004, 3:23 am
Perl vs PHP speed? March 1, 2006, 5:19 pm
Asynchronous perl execution April 11, 2007, 10:43 am
Re: Can I monitor the execution of a perl script September 2, 2006, 8:59 am
Can I monitor the execution of a perl script September 1, 2006, 5:50 pm
Forms using Perl vs PHP or others? (speed/volume) February 16, 2006, 6:01 pm
speed comparison of Perl to exe solutions September 2, 2006, 5:46 pm
speeding up perl script execution under apache October 29, 2004, 5:29 pm
Perl and waiting for execution of external program January 19, 2005, 8:14 am
No execution of system calls in cygwin-perl after update August 24, 2006, 4:22 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap