Click here to get back home

master perl calling slave perl

 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
master perl calling slave perl Ela 05-04-2008
Posted by Ela on May 4, 2008, 2:32 am
Please log in for more thread options
In slave perl prog, there're some print codes.
However, when the master perl calling the slave one by system(command), the
slave perl print cannot be redirected to STDOUT. how to solve that?



Posted by Joost Diepenmaat on May 4, 2008, 3:04 am
Please log in for more thread options

> In slave perl prog, there're some print codes.
> However, when the master perl calling the slave one by system(command), the
> slave perl print cannot be redirected to STDOUT.

What? That's what it already does by default.

> how to solve that?

Did you mean something like

system("perl my_other_program.pl > /dev/null") and die;

?

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

Posted by Ela on May 4, 2008, 4:05 am
Please log in for more thread options
> Did you mean something like
>
> system("perl my_other_program.pl > /dev/null") and die;
>
> ?
>
This makes STDOUT nothing to print, I guess?

When running the slave prog directly by perl slave.pl, something is printed
onto screen
but perl master.pl (master.pl call salve.pl by system) does not



Posted by Jo on May 4, 2008, 6:10 am
Please log in for more thread options
Ela said:
> When running the slave prog directly by perl slave.pl, something is
> printed onto screen but
> perl master.pl (master.pl call salve.pl by > system)
> does not

On my system it does.
Maybe you should post a simple example of master.pl and slave.pl
showing when it doesn't.


Posted by Ela on May 4, 2008, 11:03 am
Please log in for more thread options

> Ela said:
>> When running the slave prog directly by perl slave.pl, something is
>> printed onto screen but
>> perl master.pl (master.pl call salve.pl by > system)
>> does not
>
> On my system it does.
> Maybe you should post a simple example of master.pl and slave.pl
> showing when it doesn't.
>


Oh sorry the perl is called by a master SHELL master.sh but not master
perl...

#!/bin/sh
`perl slave.pl $dirname`

So how to solve?



Similar ThreadsPosted
Calling a COM object from Perl February 1, 2005, 12:37 pm
Calling a COM object from Perl February 1, 2005, 12:43 pm
calling AWK from perl question June 9, 2006, 7:13 pm
Calling 'C' function from Perl February 15, 2007, 12:49 am
Calling a perl script from an html doc October 18, 2004, 12:44 pm
calling a perl script from JavaScript August 3, 2005, 3:34 pm
Calling C++ from Perl and vice versa January 22, 2006, 12:08 pm
Help calling perl from gnu make on windows March 29, 2006, 10:28 am
Calling a 32 bit Library from 64 bit perl extension September 24, 2007, 1:01 pm
Calling a function from a win32-DLL in perl December 27, 2007, 7:17 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap