コマンドラインからだと作成されるpngファイルがブラウザからだと作成されません。 ブラウザにデバッグ用のprint文は、表示されます。 http://localhost/~.../sample.pl を実行しても、 ブラウザに hello-helloが表示されるだけで、 file.pngが作成されません。 file.pngをブラウザから作成するには、どうしたら良いのでしょうか? よろしくお願いいたします。 コマンドラインからだと、gnuplotで作成されたfile.pngが作成されます。 bash-3.2$ perl sample.pl Content-type:text/html hello-hello 使用したプログラムは、以下のとおりです。 < sample.pl > #! /usr/bin/perl print "Content-type:text/html\n\n"; #use strict; #use warnings; use CGI; use Chart::Gnuplot; my $chart = Chart::Gnuplot->new( output => "file.png" ); my $dataSet = Chart::Gnuplot::DataSet->new( datafile => "test.data" ); print "hello-hello\n"; $chart->plot2d($dataSet);
↧