Click here to get back home

Perl 64 bit solaris - Strange Errors

 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 64 bit solaris - Strange Errors josephshibu.francis 09-28-2006
Posted by josephshibu.francis on September 28, 2006, 10:10 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 Ilya Zakharevich on September 29, 2006, 5:28 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
LWP in perl 5.8.0 in solaris 9 May 10, 2005, 3:31 am
LWP in perl 5.8.0 in solaris 8 May 10, 2005, 3:31 am
upgrading Perl / solaris 5.7 September 13, 2004, 12:56 pm
Installation of Perl/Tk under Solaris 5.8 February 23, 2005, 9:16 am
perl 5.6.1 compile on solaris 8 September 9, 2005, 3:00 pm
64bit perl for Solaris November 23, 2005, 9:02 am
Threads in perl for Solaris October 5, 2007, 1:35 pm
Solaris taking over Perl ownership November 5, 2004, 1:25 pm
Bug: Hard link in perl 5.8.6 under Solaris 8? March 21, 2005, 2:25 pm
Perl Solaris/Linux LASTLOG August 10, 2005, 11:12 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap