Click here to get back home

can't execute @SNMPGET@ on os/x box?

 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
can't execute @SNMPGET@ on os/x box? Evan Platt 08-16-2006
Posted by Evan Platt on August 16, 2006, 8: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 Sherm Pendley on August 16, 2006, 10:19 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
Embperl Execute August 30, 2005, 1:37 pm
trying to execute 'at now + 2 minutes... March 17, 2008, 11:10 am
How to get module to execute as standalone. April 10, 2006, 7:50 am
how to execute 30 transactions at a time November 20, 2006, 6:50 am
print command in qx// and execute it December 5, 2006, 9:05 am
How to execute a SQL select???? (successfully that is!) April 24, 2007, 5:11 pm
DBI; error in $handle->execute() December 4, 2007, 5:21 am
DCFORUM won't execute file as script July 26, 2005, 8:10 am
newbie question: can't get script to execute October 15, 2005, 8:46 am
Firefox Won't Execute My Perl Script October 9, 2006, 9:07 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap