From a43b67fe7e315c22df3180565d68cfa59b5f8863 Mon Sep 17 00:00:00 2001 From: tim Date: Sun, 17 Dec 2017 10:28:08 +0200 Subject: [PATCH] Some cleanups. --- glucometer_graphs.pl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/glucometer_graphs.pl b/glucometer_graphs.pl index 0199ed8..5cec335 100644 --- a/glucometer_graphs.pl +++ b/glucometer_graphs.pl @@ -5,6 +5,15 @@ use warnings; use Getopt::Long; use Time::Piece; +my $error = "Usage: $0 --input --output [--max ] [--low ] [--high ]\n"; +my @lines; +my %seen; +my @data; +my $gnuplot_data; +my $total_graphs; +my $count_graphs = 0; +my $page_number = 0; + my $input = ""; my $output = ""; # set these values either in mmol/L or mg/dL (don't mix them) @@ -22,15 +31,6 @@ GetOptions ("input=s" => \$input, # The name of the CSV file from whic die $error unless ( defined $input and defined $output ); -my @lines; -my %seen; -my @data; -my $total_graphs; -my $count_graphs = 0; -my $page_number = 0; -my $error = "Usage: $0 --input --output [--max ] [--low ] [--high ]\n"; -my $gnuplot_data; - open( my $fh, '<:encoding(UTF-8)', $input ) or die "Could not open file '$input' $!"; @@ -178,5 +178,4 @@ $gnuplot_data = join "\n", @data; print $gnuplot_data; #gnuplot(@data); - # vim: set expandtab shiftwidth=4 softtabstop=4 :