in reply to A subroutine is a reference to a list of statements
If the &foo syntax goes the way of the dodo (for calling functions) in Perl 6, then I do think a viable method of assigning code to a function would be something like:
I'm not sure I agree with the syntax you've proposed. A list is a very specific thing in Perl, and I wouldn't call a subroutine a list of statements. A block is a connected series of statements, and a subroutine is a block with benefits.&add = sub { ... };
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A subroutine is a reference to a list of statements
by princepawn (Parson) on Sep 09, 2001 at 22:45 UTC | |
by japhy (Canon) on Sep 09, 2001 at 22:49 UTC | |
by premchai21 (Curate) on Sep 09, 2001 at 23:12 UTC | |
by ariels (Curate) on Sep 10, 2001 at 12:26 UTC |