# a perl koan designed for a true perl monk
sub zen
{
my $coderef = shift; # the code ref is a
&$coderef; # Find the inner meaning
};
zen (sub {
print "How can I put a variable that is only visable
to zen from within this anon code block?";
});
# mdupont

LMAO!
I have no idea if it was intended to be funny at all, but I think that it was a brilliant question and a brilliant answer. It really made me laugh (in a happy way, not derogative at all). What can I say: ++ guys :)

# a perl koan designed for a true perl monk
sub zen
{
my $coderef = shift; # the code ref is a
&$coderef; # Find the inner meaning
};
zen (sub {
print "How can I put a variable that is only visable
to zen from within this anon code block?";
});
# mdupont

Mikey... Thats not an anonymous code block, its a anonymous sub (closure). Theres a difference.
Anon blocks don't return, subs do.
Loop controls dont work in subs, they do in anon blocks. You can have a reference to a sub but not an anon block. An anon block can have a LABEL: a sub cannot (hmm, well a named sub IS a label, but a closure cant)

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other