From f280c6653fc871b4437f50f1547d7abe8312f961 Mon Sep 17 00:00:00 2001 From: Fung Cheok Yin <61836418+E7-87-83@users.noreply.github.com> Date: Sun, 14 Jun 2020 21:50:58 +0800 Subject: Update ch-2.pl 1. modify the default test case in order to have a positive output 2. add "Usage" in comments --- challenge-064/cheok-yin-fung/perl/ch-2.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/challenge-064/cheok-yin-fung/perl/ch-2.pl b/challenge-064/cheok-yin-fung/perl/ch-2.pl index 2c04455b3a..72d3946bdd 100644 --- a/challenge-064/cheok-yin-fung/perl/ch-2.pl +++ b/challenge-064/cheok-yin-fung/perl/ch-2.pl @@ -3,6 +3,9 @@ use strict; use Math::Combinatorics; use List::Util qw{sum}; +# Usage: +# Example Input: $ perl ch-2.pl perlweeklychallenge weekly challenge perl +# Output: "perl","weekly","challenge" #ref Challenge-051 task-1 3 Sum #brute force @@ -13,8 +16,8 @@ my $S; my @W; if ($ARGV[0] eq undef) { - $S = "thequickbrownfoxjumpsoverthelazydogwooyousee"; - @W = split / /, "theq uickb rownf ox jumps over the lazy dog"; + $S = "thequickbrownfoxjumpsoverthelazydogwoo"; + @W = split / /, "theq uickb rownf ox jumps over the lazy dog woo"; } else { $S = shift @ARGV; @W = @ARGV; -- cgit