Click here to get back home

compiler optimization

 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
compiler optimization Akop Pogosian 10-30-2004
Posted by Akop Pogosian on October 30, 2004, 3:41 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
Regexp optimization April 17, 2005, 11:53 pm
looking for some size optimization April 15, 2007, 8:22 am
String comparison optimization November 29, 2006, 1:40 pm
Trebuchet calculation/optimization in Perl? October 31, 2005, 3:01 pm
combinations script - out of memory - optimization? March 15, 2006, 12:46 pm
Is there a PERL compiler? July 27, 2004, 7:40 pm
no acceptable C compiler November 24, 2004, 5:24 pm
XS compiler for Perl May 8, 2005, 8:47 pm
Perl compiler September 16, 2006, 12:29 pm
Want to install Perl compiler October 27, 2006, 2:41 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap