Click here to get back home

How to fetch output of some other script in the current running perl script?

 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
How to fetch output of some other script in the current running perl script? ritugoyal12 10-25-2007
Get Chitika Premium
Posted by Josef Moellers on October 27, 2007, 11: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
Apache vs IIS current directory fro Perl script May 8, 2008, 3:09 am
running dos commands from perl script November 14, 2006, 11:51 am
Perl version used when running the script December 5, 2007, 12:36 am
[Newbie] Running a Perl script on Windows October 8, 2005, 8:48 pm
Out of memory! When running perl script on windows August 27, 2006, 11:30 am
Running Perl script in the backend from Html September 11, 2007, 1:17 am
Running Perl script in the backend from Html September 12, 2007, 11:51 pm
Error msgno = 427 in autosys.err when running perl script - What does "427" mean ???? July 8, 2005, 8:10 am
Problem running "cvs commit -m" inside a Perl script October 2, 2006, 12:11 pm
execute current PL script in kdevelop on FC5/KDE May 14, 2007, 4:05 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap