diff options
author | Andinus <andinus@nand.sh> | 2020-06-14 00:00:34 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-06-14 00:00:34 +0530 |
commit | bc55695847c80b2a86becb54d72da30bbaf70048 (patch) | |
tree | 4dbbc62874c1d229cd80b3582cc073818a767a09 | |
parent | c676fa5cf68a12840591654f364038120591573c (diff) | |
download | ara-bc55695847c80b2a86becb54d72da30bbaf70048.tar.gz |
Initialize %hide earlier
-rwxr-xr-x | ara.pl | 3 |
1 files changed, 1 insertions, 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 } = () |