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