[Israel.pm] Fwd: [Telux] Next Meeting: "High-Level Programming Concepts Using Perl 6" on 22-March

Gabor Szabo szabgab at gmail.com
Sat Mar 14 08:09:12 PDT 2009

On Sat, Mar 14, 2009 at 4:01 PM, Evgeny <evgeny.zislis at gmail.com> wrote:
> Now there is also another issue I remember having.
> How can I pass an unspecified amount of arguments to a function, since a
> function does not really care how many parameters it gets - I just read them
> one by one with "shift". I want to have a generic $callback->(.........)
> where instead of the dots I dont use an array, but "explode" this array into
> multiple arguments.
> In ruby it is done exactly like that   callback( * array )   where the * is
> exploding it.

I  am not sure I understand you

sub f {
   my @args = @_;


sub g {
   my ($self, $arg1, $arg2, @more_args) = @_;

something along those lines.

BTW are we having a Perl course on the Ruby list now ? :-)


More information about the Perl mailing list