programming-examples/perl/Subroutine/Return two array references from a subroutine.pl
2019-11-15 12:59:38 +01:00

12 lines
156 B
Raku

sub getarrays
{
@a = (1, 2, 3);
@b = (4, 5, 6);
return \@a, \@b;
}
($aref, $bref) = getarrays;
print "@$aref\n";
print "@$bref\n";