Thread stdout/stderr eines Kommandos (Backticks) ausgeben: die vordefinierte Perl-Variable $? (5 answers)
Opened by Joseba at 2007-07-21 15:00

jubei
 2007-07-21 16:31
#78738 #78738
User since
2007-07-19
22 Artikel
BenutzerIn
[default_avatar]
...hier noch ein auszug aus perlfunc:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
You can check all the failure possibilities by inspecting $?
like this:

if ($? == -1) {
print "failed to execute: $!\n";
}
elsif ($? & 127) {
printf "child died with signal %d, %s coredump\n",
($? & 127), ($? & 128) ? 'with' : 'without';
}
else {
printf "child exited with value %d\n", $? >> 8;
}

View full thread stdout/stderr eines Kommandos (Backticks) ausgeben: die vordefinierte Perl-Variable $?