Click here to get back home

executable perl man pages

 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
executable perl man pages Lynn David Newton 12-02-2004
Posted by Lynn David Newton on December 2, 2004, 8:16 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 Matt Garrish on December 2, 2004, 8: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

Similar ThreadsPosted
Compiled perl executable July 7, 2008, 10:52 pm
Perl Executable and Script Name -- NOT Args November 29, 2004, 9:02 am
howto set args for perl executable? December 30, 2004, 8:26 am
Can perl check if executable exists March 16, 2006, 12:52 pm
Useing Perl With C to Read From Executable May 14, 2006, 11:45 am
How to make perl script executable from anywhere on windows? April 20, 2007, 12:06 am
Perl executable showing html in default browser April 9, 2005, 6:33 pm
Cyrillic web pages with Perl and MySQL November 27, 2005, 5:35 pm
Russel Quong's "Perl in 20 pages" September 21, 2006, 7:06 am
using perl to submit username/password and access subsequent pages February 9, 2005, 5:13 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap