These are the holes which were prepared for the Perl Golf Apocalypse, a
tournament of Perl Golf, at TPC4. The first two were intended as practice
holes. Technical difficulties forced us to halt the tournament after
revealing the next five holes, up to Vowel Sort.
Guidelines for Solving the Holes
These are the rules and guidelines that were used for the Perl Golf
You may use Perl's standard documentation while writing your solutions. No
other reference material may be used.
Subroutines that should return a single scalar value will always be called
in scalar context. (Subroutines that should return a list will always be
called in list context, of course.) You may make use of this fact while
writing your solution.
For example, a subroutine that returns the minimum element in a list will
always be called in scalar context, while a subroutine that sorts a list of
elements will be called in list context.
You may write and test your one-liners in whatever shell you prefer, but
they must be executable under bash (the Bourne-Again Shell) for judging
purposes. Any solution which fails under bash will be disqualified.
The following characters are metacharacters in bash:
| & ; ( ) < > $ ! space tab
These characters should be quoted either with quotation marks or a
backslash. The quoting characters will count towards the length of the
solution for scoring purposes.
$ perl -le print+2+4
$ perl -le print+2|4
bash: 4: command not found
$ perl -le print+2\|4
$ perl -le 'print 2|4'
All characters in the one-liner will be counted towards the length for
scoring purposes. Of the following two solutions, the second one has a
perl -le print+2+4
- Fifth Word
- Error Message
- Max without Sort
- Smallest Repeating Pattern
- Hex to Char
- Translate within Parentheses
- Vowel Sort
- Digital Root
- Rotate 180
- Addition without Addition
Comments and Submitting Solutions
If you would like to show off your solutions to these holes, you can email
them to firstname.lastname@example.org.
They may appear on a forthcoming submitted solutions page. Feel free to
send comments as well, on your solutions, on these holes, or on Perl Golf
in general. Thanks!