export variables 
Author Message
 export variables

Is there a way to export variables in perl.
like (export xyz) in shell programming.

Thanks



Fri, 14 Jan 2000 03:00:00 GMT  
 export variables

[posted and mailed]

Quote:

> Is there a way to export variables in perl.
> like (export xyz) in shell programming.

"export" is an artifact of bourne shell programming, it is not common to
all shell programming.  In C-shell and its ilk one uses "setenv" to
accomplish the same sort of thing.

What you really want to do is to ensure that this VARIABLE=VALUE pair is
in the environment of your children.  Look up "environment" in the
docs/FAQs.  If you can't find it that away, try looking up the hash %ENV
in perlvar.

- doug



Sat, 15 Jan 2000 03:00:00 GMT  
 export variables

Quote:

> Is there a way to export variables in perl.
> like (export xyz) in shell programming.

Environment variables (documented in perlvar(1)) are automatically
exported to child processes, although you should probably also read the
FAQ entry on trying to change the variables in the parent process. Hope
this helps!

--
Tom Phoenix           http://www.teleport.com/~rootbeer/

Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



Sat, 15 Jan 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. help! package export variables

2. How to export variables from main to other package modules

3. exporting variables

4. Exporting variables from a module

5. Exporting variables from modules

6. Exporting variables from packages

7. help! package export variables

8. Exporting Variables...again

9. Exporting Variables...

10. Exporting Variables... followup

11. Exporting Variables...

12. exporting variables to unix shell

 

 
Powered by phpBB® Forum Software