in reply to Re: Calling a setuid script in a perl script
in thread Perl Setuid - Oracle Password Hardcoding

I assume the OP wants it as an extra suid script because it must read a file the main script has no permissions for, and it makes complete sense to keep the suid portions of a script as small as possible. Making the whole thing a module would defeat this purpose.

If I understood this correctly, the solution is very easy:

$password = `getPwd.pl`; chomp $password;