Click here to get back home

First attempt at a module fails

 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
First attempt at a module fails Gary Schenk 12-02-2004
Posted by Gary Schenk on December 2, 2004, 6:26 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
Can't locate object method "first" via package "attempt" (perhaps you forgot to load "attempt"?) at .... June 19, 2005, 3:56 pm
require fails yet module exists in @INC path...? May 17, 2005, 10:20 pm
module OpenOffice::OODoc fails with Unicode characters August 7, 2007, 10:21 am
import fails if package namespace != module path September 24, 2007, 4:48 pm
malformated substitution attempt June 6, 2006, 3:06 am
How to create an empty file? (second attempt) April 10, 2005, 5:58 am
Threads - "Attempt to free non-existent shared string" November 12, 2006, 5:38 am
List::MoreUtils::each_arrayref: "semi-panic: attempt to dup freed string" February 24, 2006, 7:37 pm
Constant.t fails 240 of 272 tests and recurs.t fails 1 of 25 tests on HPUX using perl 5.8.7 December 8, 2005, 9:16 am
[FR-EN] Pb de hachage dans un module (.pm) / make a hash in a module (.pm) September 1, 2005, 1:59 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap