in reply to Arrays and Scalar Parameters
First, if you know that the first n will be your array and the last will be a seperate value then you can use that when picking up your information.
However this code can become confusing. I prefer to handle this by returning references for structures.#callMult returning an array and a scalar my @ret = callMult(); my $foo = pop @ret;
sub callMult { return \@result, $count; } my ($result, $count) = callMult(); # you can then use $result->[$i]; # to access the array elements # or @result_array = @$result; # to dereference it
|
|---|