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);