We don't bite newbies here... much | |
PerlMonks |
Running perl script from a perl scriptby ikuzmanovs (Novice) |
on Jan 08, 2010 at 16:33 UTC ( [id://816345]=perlquestion: print w/replies, xml ) | Need Help?? |
ikuzmanovs has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have a series of perl script each dependent on the output of the previous, some of them with command line arguments.
Is there a way for this to be done in Perl so that I run the whole pipeline from one single program, keeping track of all the right imput and output files and the right command line arguments (for ex. the output of the 1st program is the command line argument of the second or sth. like that) I have read about several ways of calling a shell command from within a perl script (system command, backticks, exec..)I tried them on a very simple program but they do not really work as I want to. I have a program "success.pl" which only prints "Success" on the screen and another program called "program.pl" from within which I try to execute the program success.pl. I tried the following: 1. backticks
Nothing is printed on the screen :( 2.system I get -1 3.open I get: Undefined subroutine &main::OPEN called at program.pl line 3 :( 4.exec I get 0 Help please!!! Thanks, Irena
Back to
Seekers of Perl Wisdom
|
|