I have two perl scripts:
getPwd.pl - setuid perl script that returns a password
sub getOraPwd{ ... return getOraPwd; } getOraPwd();
testDBConn.pl
I want to call getPwd.pl in the testDBConn.pl script and assign the result of the getPwd script to the $password variable to connect to a database. Remember the getPwd.pl script is setuid, and therefore setup for the testDBConn.pl to run getPwd.pl
eg.
$username="blah";
$password=result from getPwd.pl
$dsn=qq{...};
$dbh=DBI->connect($dsn, $username, $password)};