On Tue, 2005-10-04 at 15:31 +0530, [EMAIL PROTECTED] wrote:
> Hi perlers
> 
> 

Hello.

> I have one query regarding how to execute one perl file with in the 
> another perl file.
> The problem is like this I have to do 2-3 tasks by running 2-3 perl script 
> for each task ............... in some order....
> say, for first order I have to run one perl file which give me one output 
> file in text format.
> And for the next task this test file generated is fed as input then it 
> generates one more text file. then for the task 3 the text file generated 
> by task 2 file is made to input and then it genearates some text 
> file........and so on..........
> 
> So in the nut shell I want to do all this task by executing only one perl 
> file...........
> which will call all the perl file in the order in which i 
> need..............
> So could u plz tellme is there any function thriugh which I can do this 
> way.....................
> 

yes.

see the perl system command.

#!/usr/bin/perl

use warnings;
use diagnostics;
use strict;

`./perl_script1`;
`./perl_script2`;
system("./perl script3") || die "blah blah blah $!"; #NOT SURE IF THE
LOGIC HERE IS REVERSED I DON'T USE IT AT ALL YOU CAN FIND THAT OUT.
exec("./final.pl");



this assumes you hard code the output of script1 as input to script2 and
script2 to script3.

Oh also I haven't tested this and I don't use windows, but it might work
on linux and with minor mods on windows.


> Will the execute() funtion solve the purpose .....................which we 
> use in DBI etc.................

I don't think so.

I think your . button maybe stuck!


HTH


Dan.
> 
> 
> thankX
> 
> n
> With warm regards
> 
> 
> 
> 
> Mayank Ahuja
> Team Member
> Tata Consultancy Services Limited
> Ph:- 044-55555816
> Cell:- 9283199460
> Mailto: [EMAIL PROTECTED]
> Website: http://www.tcs.com
> 
> Notice: The information contained in this e-mail message and/or attachments 
> to it may contain confidential or privileged information.   If you are not 
> the intended recipient, any dissemination, use, review, distribution, 
> printing or copying of the information contained in this e-mail message 
> and/or attachments to it are strictly prohibited.   If you have received this 
> communication in error, please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message and any attachments.  Thank you



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to