go ahead... be a heretic | |
PerlMonks |
Re: How's your Perl? (II)by ambrus (Abbot) |
on Jul 22, 2004 at 13:55 UTC ( [id://376571]=note: print w/replies, xml ) | Need Help?? |
Spoilers: 1:
7:
6: I don't know weather this is cheating or not, but it does make the (updated) expression true:
Update: a clean solution for 6:
Update again: 2:
Update: a wildcard solution for 3:
Update: I finally realized that I should have known 12 from the start: it was in last year's quiz.
Update: and here's an answer for 8, although you might take it as cheating as it requires an adittional option on the command line to be set.
Note that I'm not just executing the print Ok statement with some trick. The expression !eval { [ @foo ] } actually gets evaluated, but somehow an exception gets generated inside the eval, thus eval returns false. Update: you can give the switch in the shebang line too. If you write this to a file and execute it with perl, it works.
In Section
Meditations
|
|