BASH and perl are two seperate things that do a lot of things the same.
In what aspect are you looking to do this? The only reason to export a variable in BASH is so that you can use it in a shell script that you call.
You normally set the variables you want in perl program before you call them. If, for some reason you wanted to grab the shell variables you called before hand you could always attempt a system call to get the variable.
Otherwise, when you call the perl script, use the BASH variables you've created as inputs to the script, such that you'd call it like this:
myperl.pl $BLAH
Where BLAH is a variable set before hand in the shell. And you'll use the $# variable or whatever it is that houses the command line elements you added after the invocation of the perl script.
Last edited by Technoslave; 04-08-2005 at 01:18 PM.
|