
Passing a variable from a Perl script to a shell script
To call a shell script from perl, use the "system" statement in Perl.
Example follows.
Here is a perl script, tmp.pl
$password="test123";
system("tmp.sh $password");
Here is the called one-line shell script, tmp.sh:
echo "$1"
Here is how to run the perl script:
$ /usr/bin/perl tmp.pl
tmp.pl calls tmp.sh which outputs:
test123