Click here to get back home

Including executable files in a subdirectory

 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
Including executable files in a subdirectory timdooling 05-09-2007
Posted by timdooling on May 9, 2007, 11: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

Posted by Joe Smith on May 10, 2007, 12:52 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
To find a quick way to list all files in the directory(and subdirectory) April 21, 2008, 3:46 am
problem including perl header files May 15, 2006, 6:05 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
Recursively making a copy of a subdirectory.. September 12, 2005, 5:12 am
executable perl man pages December 2, 2004, 8:16 am
You must specify the PHP executable used for the debug session January 20, 2007, 4:46 pm
Compiled perl executable July 7, 2008, 10:52 pm
problem in including module August 8, 2005, 1:45 am
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

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap