From c052bd176f19810517bd8ca1caf24a11e2c25d46 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 9 Jul 2025 22:27:39 +0200 Subject: [PATCH] mkhelp.pl: enable strict/warnings, fix them --- src/mkhelp.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mkhelp.pl b/src/mkhelp.pl index 782c466524..d1a040c0cc 100755 --- a/src/mkhelp.pl +++ b/src/mkhelp.pl @@ -23,11 +23,17 @@ # ########################################################################### -if($ARGV[0] eq "-c") { - $c=1; +use strict; +use warnings; + +my $c = 0; +if(@ARGV && $ARGV[0] eq "-c") { + $c = 1; shift @ARGV; } +my @out; + push @out, " _ _ ____ _\n"; push @out, " ___| | | | _ \\| |\n"; push @out, " / __| | | | |_) | |\n"; @@ -67,8 +73,8 @@ if($c) my $gzippedContent; IO::Compress::Gzip::gzip( \$content, \$gzippedContent, Level => 9, TextFlag => 1, Time=>0) or die "gzip failed:"; - $gzip = length($content); - $gzipped = length($gzippedContent); + my $gzip = length($content); + my $gzipped = length($gzippedContent); print <