Click here to get back home

Perl compiler for MAC and Linux?

 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 compiler for MAC and Linux? Bill H 09-28-2007
Get Chitika Premium
Posted by Bill H on September 28, 2007, 8:44 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

Posted by Ben Morrow on September 28, 2007, 11:30 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
Is there a PERL compiler? July 27, 2004, 7:40 pm
XS compiler for Perl May 8, 2005, 8:47 pm
Perl compiler September 16, 2006, 12:29 pm
Want to install Perl compiler October 27, 2006, 2:41 pm
FAQ: I don't have a C compiler on my system. How can I compile perl? October 12, 2004, 11:10 pm
FAQ 2.3 I don't have a C compiler on my system. How can I compile perl? January 13, 2005, 12:03 pm
FAQ 2.3 I don't have a C compiler on my system. How can I compile perl? April 20, 2005, 11:03 pm
FAQ 2.3 I don't have a C compiler on my system. How can I compile perl? July 6, 2005, 10:03 am
FAQ 2.3 I don't have a C compiler. How can I build my own Perl interpreter? August 23, 2005, 10:03 am
FAQ 2.3 I don't have a C compiler. How can I build my own Perl interpreter? November 30, 2005, 5:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap