I'm trying to set some ENV variables so that other programs can use them.
Setting via %ENV doesn't work after the Perl script (child) has terminated.
So I thought the Shell module should help - apparently this allows shell commands to be run.
Although something like this (example from perldoc):
#!/usr/bin/perl -w
use Shell;
$foo = echo("howdy", "funny", "world"
;
print $foo;
does indeed work,, I found that trying to "export" to bash doesn't:
#!/usr/bin/perl -w
use Shell;
$foo = export('WORLD=earth');
Perl reports:
Can't exec "export": No such file or directory at (eval 1) line 57.
Can't exec export: No such file or directory
Any ideas anyone?
Rob
Setting via %ENV doesn't work after the Perl script (child) has terminated.
So I thought the Shell module should help - apparently this allows shell commands to be run.
Although something like this (example from perldoc):
#!/usr/bin/perl -w
use Shell;
$foo = echo("howdy", "funny", "world"
print $foo;
does indeed work,, I found that trying to "export" to bash doesn't:
#!/usr/bin/perl -w
use Shell;
$foo = export('WORLD=earth');
Perl reports:
Can't exec "export": No such file or directory at (eval 1) line 57.
Can't exec export: No such file or directory
Any ideas anyone?
Rob