[plug] Perl $? equivalent

Jay Turner jturner at bsis.com.au
Fri Mar 12 13:41:22 WST 2004


Hi All,

Can anyone tell me what (if any) the Perl equivalent to Bash's '$?' is.

I am calling a program (`cat mailFile | sendmail -t`) from a perl script and
I want to check that it has executed properly or not.

In bash I would just "if [ $? -ne 0 ]" but I don't think I can locate an
equivalent in Perl.

Thanks
Jay





More information about the plug mailing list