diff options
| -rw-r--r-- | challenge-002/jaime/README.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/challenge-002/jaime/README.md b/challenge-002/jaime/README.md new file mode 100644 index 0000000000..d9a13f0ca9 --- /dev/null +++ b/challenge-002/jaime/README.md @@ -0,0 +1,26 @@ +# Perl Weekly Challenge 002 +By Jaime; @tortsnare on Twitter. + +Straightforward solutions in Perl 5 that use no imports. +The user selects a conversion and feeds in numbers, in a UNIX-like approach. + +The faniest bit was an `eval` introduced at the end to toggle the conversion operation at runtime. + +# ch-1.pl + +Run as a single shell one-liner: +`perl -E 'while(<>) {s/^0+//;print;}' # interactively reads numbers` + +or pipe the numbers, example: +`cat number_list | perl -E 'while(<>) {s/^0+//;print;}` + +# ch-2.pl +Run as a Perl 5 script. + +## Convert base10 into base35 + +`cat integer_list | perl ch-2.pl` + +## Convert base35 into base10 + +`cat base35_list | perl ch-2.pl --base35-to-int` |
