Click here to get back home

How long to complete: while ($i<1e10)

 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
How long to complete: while ($i<1e10) Jose Gomez 11-06-2004
Posted by Jose Gomez on November 6, 2004, 9:16 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

Posted by Lukas Mai on November 6, 2004, 8:20 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
'long long integer' in Perl February 15, 2006, 2:30 pm
How long is too long for cgi script? April 22, 2005, 12:07 pm
How to unpack long long ? June 12, 2008, 9:51 am
How to unpack long long ? June 12, 2008, 9:52 am
Please help a complete newbie July 29, 2004, 2:45 pm
where to get a complete perldoc ? July 5, 2007, 11:10 am
complete manual and reference September 25, 2005, 3:22 pm
Nvu - The Complete Web Authoring System December 15, 2006, 12:57 am
complete pattern matching March 22, 2008, 2:10 am
How to checking a file that writing is complete? October 17, 2004, 11:32 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap