Click here to get back home

embedded perl path $ENV problem

 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
embedded perl path $ENV problem R. Sherwin Kartick 09-22-2004
Posted by R. Sherwin Kartick on September 22, 2004, 4:29 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
Absolute path problem March 22, 2005, 7:48 am
Embedded Perl April 25, 2005, 9:44 am
Python Doc Problem Example: os.path.split September 18, 2005, 3:46 am
"Incremental" Embedded Perl May 24, 2005, 8:49 am
Perl on embedded device June 10, 2008, 5:45 pm
Using strict and warnings in embedded perl July 14, 2004, 4:11 am
Using embedded PERL with commercial applications? November 23, 2004, 10:56 pm
Including modules in embedded perl with VC++ May 17, 2005, 11:56 pm
Error Handler in Embedded Perl May 23, 2005, 12:54 pm
Is there anybody who ever embedded perl code to MRTG? February 20, 2006, 4: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