in reply to Is there an andand for Perl like there is in Ruby?
$ cat test.t class A { method some-method { say "called some-method"; } } my $a = undef; my $b = A.new; for $a, $b -> $obj { $obj.?some-method } $ ./perl6 test.t called some-method
You can also use it to call a method on $_ like this:
for $a, $b { .?some-method }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is there an andand for Perl like there is in Ruby?
by frew (Acolyte) on Jan 09, 2009 at 23:03 UTC |