Perhaps you should use a "template" file that contains what varibles are
initialized to.
I have run into this situation many times, and a file that contains some
values to default to is better than anything else... so you would feed your
command

myscript.pl c:/path/to/template.file

better to spawn off things as such than to try to pass every single
arguement to the command line.

> -----Original Message-----
> From: Hunt, Robert W. (Orion Consulting)
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 30, 2002 3:10 PM
> To: '[EMAIL PROTECTED]'
> Subject: Re: Pass variables from parent to child script
> 
> 
> I am using NT (I wish I were using UNIX - I am more 
> comfortable in that
> world).
> 
> The objective is to declare variables such as file names, 
> file locations,
> logging flags, alert flags, email addresses, etc, etc in only 
> one script
> that will control program flow (ie: decide which child 
> scripts to execute
> based on these variables).  The problem is that I don't know 
> how to get
> these child scripts to recognize the variables declared in the parent
> script, and it is not practical or convenient to contain the entire
> functionality in one script...
> 
> Just a simple example: 
> 
> When I move this code from my machine to a server, I want to 
> change the
> variables that declare the location of the data to be 
> processed only once,
> not in every script that needs to know that data location.
> 
> Thanks for your help.
> 
> "Nikola Janceski" <[EMAIL PROTECTED]> wrote in message
> news:<1449413DA482D311B67000508B5A12F506ED50AD@NYEXCHANGE01>...
> > what does your system command look like?
> > Are you running this on UNIX? if so, why not use fork?
> > you might be interested in reading the:
> >     perldoc perlipc
> > 
> > There is usually a chapter in every perl book on IPC. Some 
> are better than
> > others.
> > 
> > what kind of varibles do you want to pass? (how about a 
> using a pipe or
> temp
> > file?)
> > 
> > 
> > > -----Original Message-----
> > > From: Rob [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, April 30, 2002 1:47 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Pass variables from parent to child script
> > > 
> > > 
> > > When executing a child script from a parent script using the 
> > > system command,
> > > is there a way to allow the child script to recognize the 
> > > variables declared
> > > by the parent script?
> > > 
> > > In other words, can you replicate the export functionality of 
> > > a UNIX shell
> > > script using PERL?
> > > 
> > > Thanks
> > > 
> > > 
> > > 
> > > -- 
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > 
> > 
> >
> --------------------------------------------------------------
> --------------
> > --------------------
> > The views and opinions expressed in this email message are 
> the sender's
> > own, and do not necessarily represent the views and 
> opinions of Summit
> > Systems Inc.
> > 
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to