> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 10, 2006 10:22 PM
> To: perl6-language@perl.org
> Subject: [svn:perl6-synopsis] r8637 - doc/trunk/design/syn
> 
> Author: larry
> Date: Mon Apr 10 19:21:56 2006
> New Revision: 8637
> 
> Modified:
>    doc/trunk/design/syn/S04.pod
> 
> Log:
> Bare block executes immediately; return of closure must be explicit.
> 
> 
> Modified: doc/trunk/design/syn/S04.pod
> 
> +Although a bare block is no longer a do-once loop, it still executes
> +immediately as in Perl 5.  If you wish to return a closure from a
> +function, you must use an explicit C<return>.
> +

  
   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";};
?


Joe Gottman

Reply via email to