P is for Practical | |
PerlMonks |
Getting a return code from a perl script called via system()by c (Hermit) |
on Dec 15, 2002 at 14:34 UTC ( [id://220000]=perlquestion: print w/replies, xml ) | Need Help?? |
c has asked for the wisdom of the Perl Monks concerning the following question:
I think the title, sums up this one. I have a CGI script that is calling another script via system(), specifically, my $ERR = system("/usr/bin/sudo /usr/local/nbin/verify.pl --username foo --password bar"). As you can guess, the verify.pl script verifies the provided password against the system password for the spec'd username. I use Authen::PAM for the process, and in the verify.pl script, I return the result
However, it looks as though $ERR is always set to 0 since the system call is working. How can I get the return from my verify.pl script to show up in the value of $ERR? thanks! -c
Back to
Seekers of Perl Wisdom
|
|