Posterous theme by Cory Watilo

Filed under: perl

Ez de szép

Using only Perl keywords (no literals or punctuation):[3]

not exp log srand xor s qq qx xor
s x x length uc ord and print chr
ord for qw q join use sub tied qx
xor eval xor print qq q q xor int
eval lc q m cos and print chr ord
for qw y abs ne open tied hex exp
ref y m xor scalar srand print qq
q q xor int eval lc qq y sqrt cos
and print chr ord for qw x printf
each return local x y or print qq
s s and eval q s undef or oct xor
time xor ref print chr int ord lc
foreach qw y hex alarm chdir kill
exec return y s gt sin sort split

Acme::Don't - search.cpan.org

DESCRIPTION ^

The Acme::Don't module provides a don't command, which is the opposite of Perl's built-in do.

It is used exactly like the do BLOCK function except that, instead of executing the block it controls, it...well...doesn't.

Regardless of the contents of the block, don't returns undef.

You can even write:

don't {
        # code here
    } while condition();

And, yes, in strict analogy to the semantics of Perl's magical do...while, the don't...while block is unconditionally not done once before the test. ;-)

Note that the code in the don't block must be syntactically valid Perl. This is an important feature: you get the accelerated performance of not actually executing the code, without sacrificing the security of compile-time syntax checking.

:-)