Click here to get back home

PERL 64bit Question

 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 64bit Question Sparky 10-28-2004
`--> Re: PERL 64bit Question Tassilo v. Pars...10-29-2004
Get Chitika Premium
Posted by Sparky on October 28, 2004, 10:15 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 Tassilo v. Parseval on October 29, 2004, 7:29 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
PERL 64bit Question November 1, 2004, 6:14 pm
Question about pack function in 64bit 2 core CPU May 23, 2007, 6:13 am
64bit perl for Solaris November 23, 2005, 9:02 am
long (64bit) to binary April 21, 2006, 10:30 am
Re: SvUOK always fails on 64bit platform November 23, 2007, 12:20 pm
SvUOK always fails on 64bit platform November 23, 2007, 2:57 am
MS Perl question -- how to use hacked script to work correctly(was Question on loops and return values or sumpin) December 8, 2004, 12:59 pm
I want to ask you the most important question of your life. The question is: Are you saved? It is not a question of how good you are, nor if you are a church member, but are you saved? Are you sure you will go to Heaven when you die? The reason some peopl May 22, 2005, 10:11 am
I want to ask you the most important question of your life. The question is: Are you saved? It is not a question of how good you are, nor if you are a church member, but are you saved? Are you sure you will go to Heaven when you die? The reason some peopl May 24, 2005, 8:49 am
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you are, April 21, 2005, 1:25 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap