On Mon, Apr 10, 2006 at 10:32:33PM -0400, Joe Gottman wrote:
:    How does the "sub" keyword fit in here?  Is there any difference between
: the lines
:       return {say "Hello World";};
: and 
:       return sub {say "Hello World";};
: ?

Effectively, no, for these examples.  In the second case you could
omit the "return" since you're not returning a bare block, so it's
not ambiguous.  (The other difference is that the explicit sub form
allows you to return from within the closure.)

Larry

Reply via email to