From e05c0e3232810963d4c3ba8db598c1077bcbb37f Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 31 Jul 2010 23:54:52 -0700 Subject: [PATCH] more intelligent handling of shebang plotting --- feedGnuplot.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feedGnuplot.pl b/feedGnuplot.pl index e4a50a2..1a722af 100755 --- a/feedGnuplot.pl +++ b/feedGnuplot.pl @@ -8,6 +8,7 @@ use Data::Dumper; use threads; use threads::shared; use Thread::Queue; +use Text::ParseWords; open(GNUPLOT_VERSION, "gnuplot --version |"); my ($gnuplotVersion) = =~ /gnuplot\s*([0-9]*\.[0-9]*)/; @@ -120,7 +121,7 @@ OEF # takes care of both those cases. if(exists $ARGV[0] && !-r $ARGV[0]) { - unshift @ARGV, split(/\s+/, shift(@ARGV)); + unshift @ARGV, shellwords shift @ARGV; } # do not stream in the data by default