then what about thru (``) Backtic or open call ? Syntax: 1. $x=`ps -ef`; 2. open(fh,"$cmd |");
Regards, Rathna On Thu, 3 Mar 2005 16:25:45 -0800, Nishi Prafull <[EMAIL PROTECTED]> wrote: > Apparently, the first command spawns a new shell when it is executed > and the control is never returned back and hence i cannot get the > second command to get executed. > So I am trying to evaluate the -exec option. > > Thanks. > > On Thu, 3 Mar 2005 16:14:30 -0800, Wagner, David --- Senior Programmer > Analyst --- WGO <[EMAIL PROTECTED]> wrote: > > Nishi Prafull wrote: > > > Hi: > > > Apparently I noticed that when I put both the commands I need to run > > > in one script using the system call, the second command does not get > > > executed ( I cannot figure out the cause). > > They would have to be two separate calls. I used to start 10 to 15 > > processes at one time using a Perl script to get my setup the way I wanted > > it. Then I knew exactly where they were and the order they were in. > > > > So you only need to do; > > > > my $MyStatus1 = system('script1.pl'); # make sure you qualify the > > script as much as necessary and not rely on > > # paths. > > # should check that status was a success which i believe is > > backwards from what Perl defines as success(0: good, <> # 0:error) > > > > my $MyStatus2 = system('script2.pl'); # second one to execute. > > > > Wags ;) > > > Each of the commands are making out calls to software installed on the > > > machine to perform specific tasks. > > > > > > Do I have to do anything else in this regard? > > > > > > Thanks. > > > > > > On Thu, 3 Mar 2005 15:50:16 -0800, Tim Johnson <[EMAIL PROTECTED]> > > > wrote: > > >> > > >> I guess it partly depends on what you are trying to accomplish. Why > > >> are you calling a second script? > > >> > > >> > > >> -----Original Message----- > > >> From: Nishi Prafull [mailto:[EMAIL PROTECTED] > > >> Sent: Thursday, March 03, 2005 3:47 PM > > >> To: beginners@perl.org > > >> Subject: call a perl script within another perl script > > >> > > >> Hi: > > >> I would like to call a perl script(B.pl) within another perl > > >> script(A.pl). Should I use the following approach or something else? > > > > ******************************************************* > > This message contains information that is confidential > > and proprietary to FedEx Freight or its affiliates. > > It is intended only for the recipient named and for > > the express purpose(s) described therein. > > Any other use is prohibited. > > ******************************************************* > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- Regards, Rathna. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>