aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Lied <boblied+github@gmail.com>2024-03-22 09:16:47 -0500
committerBob Lied <boblied+github@gmail.com>2024-03-22 09:16:47 -0500
commit98cd209c996e65aa2aa00fbceb5d36374d38a166 (patch)
tree4fb90d90d2eb1c71867c1d552f590ff12c284182
parent19500e12bf0159ed58cade58ff83b9b3b3415c6f (diff)
downloadperlweeklychallenge-club-98cd209c996e65aa2aa00fbceb5d36374d38a166.tar.gz
perlweeklychallenge-club-98cd209c996e65aa2aa00fbceb5d36374d38a166.tar.bz2
perlweeklychallenge-club-98cd209c996e65aa2aa00fbceb5d36374d38a166.zip
Add -s START to run from command line
-rw-r--r--challenge-261/bob-lied/perl/ch-2.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/challenge-261/bob-lied/perl/ch-2.pl b/challenge-261/bob-lied/perl/ch-2.pl
index 51379cdd76..cec4ef814a 100644
--- a/challenge-261/bob-lied/perl/ch-2.pl
+++ b/challenge-261/bob-lied/perl/ch-2.pl
@@ -33,12 +33,14 @@ use v5.38;
use builtin qw/true false/; no warnings "experimental::builtin";
use Getopt::Long;
-my $Verbose = 0;
+my $Start = 0;
my $DoTest = 0;
-GetOptions("test" => \$DoTest, "verbose" => \$Verbose);
+GetOptions("test" => \$DoTest, "start" => \$Start);
exit(!runTest()) if $DoTest;
+say multiplyByTwo($Start, @ARGV);
+
sub multiplyByTwo($start, @ints)
{
my %present = map { $_ => true } @ints;