> -----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?
You can pass values through the environment:
in parent: $ENV{FOO} = "bar";
in child: print $ENV{FOO};
There is no equivalent of the shell's "export" in Perl;
changes to %ENV are automatically visible in the child.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]