From bc55695847c80b2a86becb54d72da30bbaf70048 Mon Sep 17 00:00:00 2001 From: Andinus Date: Sun, 14 Jun 2020 00:00:34 +0530 Subject: Initialize %hide earlier --- ara.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ara.pl b/ara.pl index e7e0618..ee4ae78 100755 --- a/ara.pl +++ b/ara.pl @@ -28,7 +28,7 @@ foreach my $path (@INC) { } my ( $use_local_file, $get_latest, $state_notes, $rows_to_print, $no_delta, - $no_total, @to_hide ); + $no_total, @to_hide, %hide ); GetOptions( "local" => \$use_local_file, @@ -49,7 +49,6 @@ push @to_hide, "india" # Creating %hide and undefining all %hash{@to_hide}, after this we # check if %hash{@to_hide} exists with exists keyword. Read this as # "undef these keys from the hash". https://perldoc.pl/perldata#Slices -my %hide; undef @hide{ @to_hide } if scalar @to_hide; # Array can't be empty, will fail. # Alternatively can do @hide{ @to_hide } = () -- cgit 1.4.1-2-gfad0