From: Michele Dondi Subject: Re: I find the perl syntax easier than python Message-ID: Date: Thu, 03 May 2007 23:41:26 +0200 On 03 May 2007 19:21:12 GMT, Abigail wrote: >\\ sub addprint ($n,$m) { say $n+$m } # ? > >And this is an advantage? Limiting yourself to two arguments? Well, you know perfectly well that this is an *artificial* example to mimic the OP's one. But yes, it's there for those cases in which I *do* want to limit myself to two arguments, and perhaps type check them. >In Perl5, you aren't tempted to use named variables, so you get >your arguments in an array. And given an array, it's natural to I can't believe you're implicitly assuming that those guys aren't thinking of letting you do that in Perl 6 too, and more. >allow a variable number of arguments: > > sub addprint {my $sum = 0; $sum += $_ for @_; print $sum, "\n"} Funny, in Perl 6 that could be sub addprint {say [+] @_} Michele -- {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^