How can I call a perl script from a perl script? 
Author Message
 How can I call a perl script from a perl script?

Is it possible to call a perl script  from a perl script passing
parameters and then retrieving the parameters in the calling script???

Waheed Khan.



Mon, 24 Nov 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?

Quote:

>Is it possible to call a perl script  from a perl script passing
>parameters and then retrieving the parameters in the calling script???

>Waheed Khan.


system (perlscriptname $param1 $param2 ...)

And then just parse them like normal in the called script.

        From one newbie to another,

                - Brian G.



Tue, 25 Nov 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?
: Is it possible to call a perl script  from a perl script passing
: parameters and then retrieving the parameters in the calling script???

1.

close SCRIPT;

2.
$output = `script $par1 $par2 ...`;

--
--
jan b schipmolder



Tue, 25 Nov 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?
: $output = `script $par1 $par2 ...`;
I think you mean:
        $output = system 'script $par1 $par2 ...';
                  ^^^^^^
--
Oliver


Tue, 02 Dec 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?


   : $output = `script $par1 $par2 ...`;
   I think you mean:
           $output = system 'script $par1 $par2 ...';

No, system doesn't work that way.  You actually do need to use the back
ticks.

Steve



Wed, 03 Dec 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?

: : $output = `script $par1 $par2 ...`;
: I think you mean:
:       $output = system 'script $par1 $par2 ...';
:                 ^^^^^^
: --
: Oliver

`script $par1`;
   is basically the same as
system('script $par1');

-me



Fri, 05 Dec 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?

Quote:

>`script $par1`;
>   is basically the same as
>system('script $par1');

They're related, but hardly the same.  They both execute the command line,
but they differ in what they return.  `command line` returns the standard
output of the command (as an array in array context, as a single string in
scalar context).  system('command line') returns the exit status of the
subshell.
--
Barry Margolin
BBN Planet Corporation, Cambridge, MA

Phone (617) 873-3126 - Fax (617) 873-5124


Fri, 05 Dec 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?

:    : $output = `script $par1 $par2 ...`;
:    I think you mean:
:          $output = system 'script $par1 $par2 ...';

: No, system doesn't work that way.  You actually do need to use the back
: ticks.

: Steve

I have a perl program calling a perl program with the simple statement:

system("script2");

I didn't need to use the backticks...

Andy

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/_/_/_/_/_/    GlobalMedia Design Inc.   _/_/_/_/_/_/_/
_/_/_/_/_/_/    The Radiation Zone(tm)    _/_/_/_/_/_/_/
_/_/_/_/  Bringing the Internet to its knees  _/_/_/_/_/
_/_/_/        http://www.magicnet.net/rz/        /_/_/_/
_/_/_/        http://www.magicnet.net/gmd/       /_/_/_/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



Sun, 07 Dec 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?


::    : $output = `script $par1 $par2 ...`;
::    I think you mean:
::         $output = system 'script $par1 $par2 ...';

:: No, system doesn't work that way.  You actually do need to use the back
:: ticks.

:I have a perl program calling a perl program with the simple statement:

:system("script2");

:I didn't need to use the backticks...

... and you didn't get the output from script2 in $output, you got
it on your screen.

To get it in a variable, you have to use backticks (or "open").

--
Hope this helps,

HansM



Mon, 08 Dec 1997 03:00:00 GMT  
 How can I call a perl script from a perl script?
I've run into a problem calling script B from script A.
Script B runs just fine when called by itself, but when
called from A, it seems to lock up at the first #include
statement (this is the ubiquitous #include "cgi-lib.pl"
for WWW server scripts).

If I comment out the #include, the code doesn't hang (but
script B dies because it cannot resolve the funciton calls).

Any ideas about possible causes and solutions?

Thanks,

 2
G


http://anarch.ie.utoronto.ca/people/golovch



Sat, 13 Dec 1997 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. question about canned perl script

2. Newbie: best way to call perl scripts from within a perl script

3. Q: Calling perl scripts from perl scripts.

4. calling other perl scripts from within a perl script

5. Calling perl scripts from perl scripts

6. call a perl script in another perl script

7. CGI-Calling a Perl script within a Perl script

8. Calling a perl script from within another perl script

9. Perl Scripts from within Perl Scripts called via DBI

10. Calling a perl script from within a perl script

11. Calling PERL scripts automatically, and System Calls from PERL

12. canned reply script

 

 
Powered by phpBB® Forum Software