makarandmk
Programmer
Hi I am novice user of perl.. my q is how to pass an array to a subroutine and how we can access different values of the array in the subroutine?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sub test {my ($arrayref) = @_; my @array = @$arrayref; return \@array;}
my @array = (a, bunch, of, stuff);
my $arrayref = test(\@array);