Re: xx operator

2006-09-28 Thread Fagyal Csongor
("---",10); Interestingly, it says: > pugs test2.p6 -- --- --- --- --- --- --- --- --- --- --- What am I misunderstanding here? The `xx` operator. That's list-repeat, not string-repeat. In Perl 5 terms, the code you wrote is: sub repeatit {

Re: xx operator

2006-09-28 Thread Juerd
Fagyal Csongor skribis 2006-09-28 15:11 (+0200): >say $string xx $repeat; List context. >my $add = $string xx $repeat; Item context, for a list repetition operator. Doesn't really make sense, and I think a warning or error message would be more appropriate. I thi

Re: xx operator

2006-09-28 Thread A. Pagaltzis
; > my $obj = MyStupidString.new; > $obj.repeatit("---",10); > > > > Interestingly, it says: > > pugs test2.p6 > -- > --- --- --- --- --- --- --- --- --- --- > > > What am I misunderstanding here? The `xx` operator. That's lis

xx operator

2006-09-28 Thread Fagyal Csongor
Hi, I have the following code: class MyStupidString { method repeatit(Str $string, Int $repeat) { say $string xx $repeat; my $add = $string xx $repeat; say $add; } }; my $obj = MyStupidString.new; $obj.repeatit("---",10); Interestin