From bcea7fb24b04edc1c6735a198ced5be13526e036 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 11 Aug 2009 00:09:12 -0700 Subject: [PATCH] autoflush in a more sane way Ignore-this: 8fc465e6dc0e7cb69d263897dbb36a48 darcs-hash:20090811070912-0cb85-2d06faa276311483cb21f8ed965f59ea486f215f.gz --- driveGnuPlots.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driveGnuPlots.pl b/driveGnuPlots.pl index f26353d..7efc365 100755 --- a/driveGnuPlots.pl +++ b/driveGnuPlots.pl @@ -2,6 +2,7 @@ use strict; use Getopt::Long; use Time::HiRes qw( usleep ); +use IO::Handle; use Data::Dumper; # list containing the plot data. Each element is a hash describing the extra @@ -84,7 +85,7 @@ sub main { local *PIPE; open PIPE, "|gnuplot" || die "Can't initialize gnuplot\n"; - select((select(PIPE), $| = 1)[0]); + autoflush PIPE 1; my $temphardcopyfile; my $outputfile;