How's your Perl? (II)by xmath (Hermit)
|on Jul 21, 2004 at 19:38 UTC||Need Help??|
After the success of last year's edition, #perlhelp (EFnet) is proud to present... insaner than ever... the second round of How's your Perl? ! :-)
There are thirteen exercises this year. Each exercise consists of a predicate to be made true by a short snippet of code preceding the test. (For example, a simple way of checking your solution for an exercise is: perl -e '<solution>; <exercise> and print "ok!\n"')
All exercises have been tested with perl 5.8.*, and solutions do not necessarily have to work with any other version. Don't hesitate to use deprecated or experimental features, or depend on implementation details or even bugs, but avoid platform dependencies.
When posting comments, please protect spoilers and solutions from accidental viewing, for example using a black-box (<table bgcolor="#000000"><tr><td><font color="#000000">Text goes here</font></table>)
Exercise 6 Update: \$foo == \$foo && !$[
Special thanks to mauke and woggle.
UPDATE: Apparently the notion of taking advantage of a yet-to-be-fixed bug is controversial. I therefore note that only
UPDATE: Minor rephrase of instructions for clarity.
UPDATE: Official solutions will be posted on monday. Until then there are hints below.
UPDATE: Official solutions have been posted.