programming-examples/perl/Subroutine/Passing by reference with pointers.pl
2019-11-15 12:59:38 +01:00

12 lines
193 B
Raku

@list1= (1..100);
@list2 = (5..200);
display(@list1, @list2); # Pass two arrays
print "-" x 35,"\n";
display(\@list1, \@list2); # Pass two pointers
sub display{
print "@_\n";
}