Hi,

From the Perl6 and Parrot Essentials:

----- 8< -----
sub flat_hash ($first, $second) {
    say "first: $first";
    say "sec. : $second";
}

my %hash = (first => 1, second => 2);

flat_hash(*%hash);
----- 8< -----

It says, that "No compatible subroutine found". I've modyfied the subroutine:

----- 8< -----
sub flat_hash (+$first, +$second) {
    say "first: $first";
    say "sec. : $second";
}
----- 8< -----

Now, I got:

first: first 1 second 2
sec. :

-----------------

I've tried it on the feather.perl6.nl machine, with pugs. Is it the right behaviour?

Bye,
  András

Reply via email to