Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Obtaining a return codeby chromatic (Archbishop) |
on May 21, 2000 at 08:11 UTC ( [id://13982]=note: print w/replies, xml ) | Need Help?? |
The special variable $? holds the status of the backtick or system operation. If you're really curious, you can do:
my $sig_number = ($? & 255);
to see which signal killed the process, if any. It's not all that useful, though, for system(), as you can get the return value anyway (as turnstep points out below).
Which return code are you expecting?
In Section
Seekers of Perl Wisdom
|
|