in reply to How to persist variable created in shell script called from Perl after shell script finished execution?
Hello sumitanshutiwari, and welcome to the Monastery!
One way is to store the shell script’s variable in the local environment, then access it from within Perl via the special %ENV hash. For example (in Windows):
13:29 >set FOO=bar 13:29 >perl -wE "say $ENV{FOO};" bar 13:30 >
See perlvar#General-Variables.
Or, store the shell script variable(s) in a file, and access the file from within Perl in the normal way.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. |
|---|