Thread perl cgi, system() geht nicht (6 answers)
Opened by hallo2010 at 2010-07-09 01:03

bianca
 2010-07-09 09:16
#139695 #139695
User since
2009-09-13
7016 Artikel
BenutzerIn

user image
2010-07-09T06:57:56 hallo2010
Er wirf mir, wenn ich system($blablu) schreibe, als Rückgabewert 256 heraus.

Das heißt, es wurde nicht ausgeführt. Der Rückgabewert muss 0 sein.
Aus perldoc -f system:
Quote
The return value is the exit status of the program as returned
by the "wait" call. To get the actual exit value, shift right by
eight (see below). See also "exec". This is *not* what you want
to use to capture the output from a command, for that you should
use merely backticks or "qx//", as described in "`STRING`" in
perlop. Return value of -1 indicates a failure to start the
program or an error of the wait(2) system call (inspect $! for
the reason).


2010-07-09T06:57:56 hallo2010
Dumme Frage von mir, wozu muss ich das machen?

Weil das Programm vielleicht keinen vernünftigen Browserheader ausgibt und man die Ausgabe dann nicht sieht.

2010-07-09T06:57:56 hallo2010
Nein.

Wäre aber hilfreich, den Fehler einzugrenzen.
Last edited: 2010-07-09 09:17:42 +0200 (CEST)
10 print "Hallo"
20 goto 10

View full thread perl cgi, system() geht nicht