diff options
| author | bagheera-sands <git@sandsscouts.org.uk> | 2019-05-13 11:39:07 +0100 |
|---|---|---|
| committer | bagheera-sands <git@sandsscouts.org.uk> | 2019-05-13 11:39:07 +0100 |
| commit | 364b6da5e3ac7349cc8f46667e93f3f43b12c59e (patch) | |
| tree | ff37eb7947326a5286d4e41211a3a353ed4740e6 /challenge-008/james-smith/perl6 | |
| parent | c03327ab9c44673d1a8d979b8d4cfd9f21c41c87 (diff) | |
| download | perlweeklychallenge-club-364b6da5e3ac7349cc8f46667e93f3f43b12c59e.tar.gz perlweeklychallenge-club-364b6da5e3ac7349cc8f46667e93f3f43b12c59e.tar.bz2 perlweeklychallenge-club-364b6da5e3ac7349cc8f46667e93f3f43b12c59e.zip | |
oops wrong folder
Diffstat (limited to 'challenge-008/james-smith/perl6')
| -rw-r--r-- | challenge-008/james-smith/perl6/ch-2.p6 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/challenge-008/james-smith/perl6/ch-2.p6 b/challenge-008/james-smith/perl6/ch-2.p6 new file mode 100644 index 0000000000..65ff323e64 --- /dev/null +++ b/challenge-008/james-smith/perl6/ch-2.p6 @@ -0,0 +1,6 @@ +sub center(*@a) { + my $ml = @a.map({$_.chars}).max; + say ' ' x (($ml - $_.chars)/2), $_ for @a; +} + +center( "This", "is", "a test of the", "center function" ); |
