Re: [PATCH] Add .trim method

2009-01-12 Thread Andy Colson
Larry Wall wrote: On Mon, Jan 12, 2009 at 05:04:50AM -0800, Ovid wrote: : ...the trivial $string.trim and trim($string) case. Hmm, I'd think .trim should work like .chomp, and return the trimmed string without changing the original. You'd use $str.=trim to do it in place. Can't say I really

multi return values

2008-11-21 Thread Andy Colson
(Sorry if this dbl-posts, sent it from the wrong account the first time) Hi all, what's wrong with this code: use v6; sub multireturn($x, $y) { my $a = $x * 2; my $b = $y * 2; return($a, $b); } my($a, $b) = multireturn(2, 3); using: This is Rakudo Perl 6, revision

Re: multi return values

2008-11-21 Thread Andy Colson
Moritz Lenz wrote: Andy Colson wrote: (Sorry if this dbl-posts, sent it from the wrong account the first time) Hi all, what's wrong with this code: use v6; sub multireturn($x, $y) { my $a = $x * 2; my $b = $y * 2; return($a, $b); } my($a, $b) = multireturn(2, 3

multi return values

2008-11-21 Thread Andy Colson
Hi all, what's wrong with this code: use v6; sub multireturn($x, $y) { my $a = $x * 2; my $b = $y * 2; return($a, $b); } my($a, $b) = multireturn(2, 3); using: This is Rakudo Perl 6, revision 32970 built on parrot 0.8.1-devel for i486-linux-thread-multi. I get:

whats wrong with this code?

2008-08-22 Thread Andy Colson
Hi List -- I'v started playing around with perl 6, and I am having problems with this example: use v6; sub xsum (@list) { my $i = 0; print summing: ; for @list { $i += $_; print $_,,; } say = $i; return

Re: whats wrong with this code?

2008-08-22 Thread Andy Colson
Moritz Lenz wrote: Hi Andy, you seem to have discovered a whole bunch of bugs at once :/ Andy Colson wrote: Hi List -- I'v started playing around with perl 6, and I am having problems with this example: use v6; sub xsum (@list) { my $i = 0; print summing