diff options
| author | John Barrett <john@jbrt.org> | 2019-04-01 22:05:39 +0100 |
|---|---|---|
| committer | John Barrett <john@jbrt.org> | 2019-04-01 22:05:39 +0100 |
| commit | 0910c851c89e3da165ad33a3454f1f330ec9f1c5 (patch) | |
| tree | e4c8e04ce56d9749b422e258fd7fea9f9803239b | |
| parent | ca4a69f929246b55ca5390723123b874cd1d3efa (diff) | |
| download | perlweeklychallenge-club-0910c851c89e3da165ad33a3454f1f330ec9f1c5.tar.gz perlweeklychallenge-club-0910c851c89e3da165ad33a3454f1f330ec9f1c5.tar.bz2 perlweeklychallenge-club-0910c851c89e3da165ad33a3454f1f330ec9f1c5.zip | |
Challenge 2, part 1
| -rwxr-xr-x | challenge-002/john-barrett/perl5/ch-1.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/challenge-002/john-barrett/perl5/ch-1.pl b/challenge-002/john-barrett/perl5/ch-1.pl new file mode 100755 index 0000000000..1567a4ba3c --- /dev/null +++ b/challenge-002/john-barrett/perl5/ch-1.pl @@ -0,0 +1,9 @@ +#!/usr/bin/env perl + +# ./ch-1.pl 00123 + +$ARGV[0] > 0 && printf ( + ( $ARGV[0] =~ /\./ + ? "%g\n" + : "%d\n" ), $ARGV[0] +); |
