diff options
Diffstat (limited to 'challenge-059')
| -rw-r--r-- | challenge-059/cheok-yin-fung/perl/ch-1.pl | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/challenge-059/cheok-yin-fung/perl/ch-1.pl b/challenge-059/cheok-yin-fung/perl/ch-1.pl deleted file mode 100644 index 3ade87fe43..0000000000 --- a/challenge-059/cheok-yin-fung/perl/ch-1.pl +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/perl -use strict; -use Test::Simple tests => 3; - - -sub newlist { - my @small = (); - my @large = (); - my ($K, @line) = @_; - foreach(@line) { - if ($_ < $K) { - push @small, $_; - } - else { - push @large, $_; - } - } - - return (@small, @large); -} - -print join "," , newlist @ARGV; -print "\n"; - -ok (newlist(3, 1, 4, 3, 2, 5, 2))==(1, 2, 2, 4, 3, 5) , "bad condition"; -ok (newlist(6,5,6,3,2,7,9)) == (5,3,2,6,7,9), "bad"; -ok (newlist(2 , 3, 2, 1)) == (1, 3, 2), "too bad"; - |
