Click here to get back home

use of our variable causes compilation 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
use of our variable causes compilation errors Perl-Misc 04-07-2006
Get Chitika Premium
Posted by Perl-Misc on April 7, 2006, 1:11 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 Brian McCauley on April 8, 2006, 4:01 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
BEGIN not safe after errors--compilation aborted February 22, 2008, 11:26 am
(Newbie Question) Digest::MD5 CPAN module compilation errors December 3, 2004, 11:07 am
regexp compilation March 30, 2005, 3:50 am
Perl Packager, pp, compilation November 14, 2006, 10:45 am
Tk Compilation on Solaris 10 Failing December 4, 2007, 3:53 am
Compilation Problem with Perl ( Bad option) September 9, 2005, 12:20 am
How to catch refs to nonexistent sub names at compilation time ? August 10, 2008, 3:20 am
Does the executable generated from perlcc needs the library(.pm) files in the same place as compilation time September 23, 2004, 5:19 pm
net::ftp errors September 5, 2004, 10:01 pm
OT: perl errors October 29, 2004, 3:04 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap