![]() |
|< 1 2 >| | ![]() |
17 Einträge, 2 Seiten |
1 2 3 4 5 6 7 8 9
open GP, '|c:/Test/Gnuplot_Perl/gp424win32/gnuplot/bin/pgnuplot.exe'; open (hier,">output.png"); use FileHandle; GP->autoflush(1); print GP 'load "Packetloss.txt"', "\n"; print hier GP; sleep 3; close hier; close GP;
1 2 3 4 5 6 7 8 9 10 11 12
my $gplot_file='Packetloss.txt'; my $gplot_cmd='c:/Test/Gnuplot_Perl/gp424win32/gnuplot/bin/pgnuplot.exe'; my $out_file='output.png'; open(my $ch, "$gplot_cmd $gplot_file |") or die "Fehler bei '$gplot_cmd $gplot_file |' ($!)\n"; open(my $fh, '>', $out_file) or die "Fehler beim oeffnen von '$out_file' ($!)\n"; while(my $data=<$ch>) { print $fh $data; } close($fh); close($ch);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use FileHandle; my $gplot_file='Packetloss.txt'; my $gplot_cmd='c:/Test/Gnuplot_Perl/gp424win32/gnuplot/bin/pgnuplot.exe'; my $out_file='output.png'; my $gplotfh = new FileHandle; $gplotfh->open ("$gplot_cmd $gplot_file |") or die "Fehler bei '$gplot_cmd $gplot_file |' ($!)\n"; my $gimage = new FileHandle; $gimage->open ("> $out_file") or die "Fehler beim oeffnen von '$out_file' ($!)\n"; while(my $data=<$gplotfh>) { $gimage->print($data); } undef($gplotfh); undef($gimage);
1 2 3 4 5
my $gplot_file='Packetloss.txt'; my $gplot_cmd='c:/Test/Gnuplot_Perl/gp424win32/gnuplot/bin/pgnuplot.exe'; my $out_file='output.png'; system("$gplot_cmd $gplot_file > $out_file") == 0 or die "konnte '$gplot_cmd $gplot_file > $out_file' nicht ausführen ($?)\n";
johnh+2008-10-12 00:31:46--Hallo Leute,
ich schaffe es nicht die Ausgabe von Gnuplot abzuspeichern
my $gplot_file='Packetloss.txt';
1 2 3 4 5 6 7
open(MYDATA, "Packetloss.txt") die ("Error: cannot open file 'data.txt'\n"); my $line; while( $line = <MYDATA> ){ print " $line\n"; } close MYDATA;
print $gplot_file;
topeg+2008-10-12 10:48:15--@moritz
probier mal
und es wird alles nach STDOUT geschickt (je nach Umgebung soll manchmal auch `set output "STDOUT"` funktionieren)
johnh+2008-10-12 10:57:25--Wenn ich nämlichCode (perl): (dl )print $gplot_file;
ausführe bekomme ich einfach das angezeigt, was hinter dem gleichheitszeichen steht...
johnh+2008-10-12 11:24:40--In "Packetloss.txt" habe ich :
![]() |
|< 1 2 >| | ![]() |
17 Einträge, 2 Seiten |