【发布时间】:2011-11-18 16:31:00
【问题描述】:
我有两个 perl 脚本:
-
getPwd.pl - 返回密码的 setuid perl 脚本
sub getOraPwd{ ... 返回 getOraPwd; } getOraPwd();
testDBConn.pl
我想在 testDBConn.pl 脚本中调用 getPwd.pl 并将 getPwd 脚本的结果分配给 $password 变量以连接到数据库。请记住 getPwd.pl 脚本是 setuid,因此设置 testDBConn.pl 以运行 getPwd.pl
例如。
$username="blah";
$password=result from getPwd.pl
$dsn=qq{...};
$dbh=DBI->connect($dsn, $username, $password)};
【问题讨论】:
-
那么,您的问题到底是什么?