aboutsummaryrefslogtreecommitdiff
path: root/challenge-034
diff options
context:
space:
mode:
authorandrezgz <andrezgz@gmail.com>2019-11-16 01:20:27 -0300
committerandrezgz <andrezgz@gmail.com>2019-11-16 01:20:27 -0300
commitb58f4b676ad533886a881a5fd9557fd61a7496e1 (patch)
tree21c8189fdd2ca5b9d239db80118fb9b168d8cdc4 /challenge-034
parent365f9121394bf2274425aa1e5e9a10f946734e4b (diff)
downloadperlweeklychallenge-club-b58f4b676ad533886a881a5fd9557fd61a7496e1.tar.gz
perlweeklychallenge-club-b58f4b676ad533886a881a5fd9557fd61a7496e1.tar.bz2
perlweeklychallenge-club-b58f4b676ad533886a881a5fd9557fd61a7496e1.zip
challenge-034 andrezgz naming fix
Diffstat (limited to 'challenge-034')
-rw-r--r--challenge-034/andrezgz/perl5/ch-1.pl6
-rw-r--r--challenge-034/andrezgz/perl5/ch-2.pl6
2 files changed, 6 insertions, 6 deletions
diff --git a/challenge-034/andrezgz/perl5/ch-1.pl b/challenge-034/andrezgz/perl5/ch-1.pl
index 043139a9b9..8a884e39ef 100644
--- a/challenge-034/andrezgz/perl5/ch-1.pl
+++ b/challenge-034/andrezgz/perl5/ch-1.pl
@@ -26,9 +26,9 @@ my $actions = {
'-hs' => \&hash_slice,
};
-my ($param, @rest) = @ARGV;
-#choose action from
-my $action = $param && $actions->{$param} || $actions->{'--help'};
+my ($option, @rest) = @ARGV;
+#choose action from the given option or invoke the default one
+my $action = $option && $actions->{$option} || $actions->{'--help'};
$action->($heroes_identity,@rest);
exit 0;
diff --git a/challenge-034/andrezgz/perl5/ch-2.pl b/challenge-034/andrezgz/perl5/ch-2.pl
index 1d7268f250..a6228da84c 100644
--- a/challenge-034/andrezgz/perl5/ch-2.pl
+++ b/challenge-034/andrezgz/perl5/ch-2.pl
@@ -26,9 +26,9 @@ my $actions = {
'-hs' => \&hash_slice,
};
-my ($param, @rest) = @ARGV;
-#choose action from
-my $action = $param && $actions->{$param} || $actions->{'--help'};
+my ($option, @rest) = @ARGV;
+#choose action from the given option or invoke the default one
+my $action = $option && $actions->{$option} || $actions->{'--help'};
$action->($heroes_identity,@rest);
exit 0;