if ($? == -1) { die "failed to execute command $????? by reason $!" } [download]
In reply to Is it possible to determine last executed command line? by bdimych