[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-team] Perl
Bonjour,
j'ai un petit problème avec un script perl :
Je voudrais faire un CGI qui crée une image a partir de gnuplot.
Voici le script :
#!/usr/bin/perl -w
use strict;
print "content-type: image/gif\n\n";
system("cp gnuplot.style gnu.style");
open(GNUFILE,">>gnu.style");
print GNUFILE "\nplot \"$ARGV[0]\" w lp\n";
close(GNUFILE);
system("gnuplot gnu.style");
Où l'argument est le nom du fichier qui contient les données a
calculer. Le problème est le suivant : Lorsque j'execute la commande
gnuplot, il n'ecrit pas le header content-type: image/gif, mais le
résultat est l'image gif.
Et evidemment si je n'éxecute pas la commande system, ca passe. On
dirait qu'il écrase le header.
Quelqu'un a-t-il une idée de pourquoi ?
Merci
--
First they ignore you...Second they laugh at you...
Then they fight you......And then you win!
(Ghandi)
---------
This message was sent by Majordomo 1.94.3. Please report problems to
manu@rtfm.be. If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.