Re: passing variables from perl to the system

2005-08-18 Thread Jeff 'japhy' Pinyan

On Aug 18, Eliyah Kilada said:

Do anyone know how to pass the perl variables to the system in order to be 
used later?!


A process cannot modify its parent's environment.  You can set environment 
variables to be used during the Perl program that are visible to the Perl 
program's child processes, through the %ENV hash.  But you cannot change 
your parent's environment.


--
Jeff "japhy" Pinyan %  How can we ever be the sold short or
RPI Acacia Brother #734 %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %-- Meister Eckhart

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




Re: passing variables from perl to the system

2005-08-18 Thread Xavier Noria

On Aug 18, 2005, at 13:38, Eliyah Kilada wrote:

Do anyone know how to pass the perl variables to the system in  
order to be used later?!


Perl offers built-in support for environment variables via the %ENV  
hash:


% cat foo.pl
$ENV{FOO} = "foo";
system q(echo $FOO);
% perl foo.pl
foo

%ENV is documented in perlvar.

See also the Env standard module, which is specially handy for PATH- 
like variables.


-- fxn

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




passing variables from perl to the system

2005-08-18 Thread Eliyah Kilada

Hi,
Do anyone know how to pass the perl variables to the system in order to 
be used later?!


I though of passing them as enviromental variables using
system (export, "sys_var_name","= $perl_var_name" );

but it doesn't work -:(

Any help is highly appreciated!

Best Regards,
Eliyah




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