Click here to get back home

Perl module error at runtime

 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 module error at runtime John Smith 08-19-2005
Get Chitika Premium
Posted by John Smith on August 19, 2005, 9:59 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 Anno Siegel on August 22, 2005, 1:01 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
Perl runtime error after installing oracle 10g November 9, 2006, 9:16 am
how to trace a error those generated at runtime by server in soap::Lite August 19, 2004, 12:17 am
Error using perl Net::SFTP module July 14, 2004, 9:55 am
perl module include error June 28, 2006, 12:42 pm
"Undefined symbol" error in Perl module that loads other shared libs January 10, 2006, 10:29 pm
Runtime disparity - Same program in Perl and Ruby June 14, 2007, 12:29 pm
Net::SMTP module error September 28, 2006, 8:29 am
Error when using a defining a new module April 3, 2007, 8:25 am
Error "Undefined subroutine" & module references August 10, 2005, 9:23 am
Module to handle substitution in error messages? November 19, 2005, 11:17 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap