Hi,
I'm trying to pass 2 arrays to a subroutine, but I wan't the subroutine to be able to manipulate the arrays directly (and not eat up memory recreating them).
How can I pass these 2 arrays to the subroutine. I know I have to pass them as a reference but I don't know what the sub should look like (as far as parameters) or whether i should pass as \@arr1 or @arr, etc.
I know that I can access the first array by looking at $_ in the sub but what would the second one be?
Simple example would work. Thanks guys!
I'm trying to pass 2 arrays to a subroutine, but I wan't the subroutine to be able to manipulate the arrays directly (and not eat up memory recreating them).
How can I pass these 2 arrays to the subroutine. I know I have to pass them as a reference but I don't know what the sub should look like (as far as parameters) or whether i should pass as \@arr1 or @arr, etc.
I know that I can access the first array by looking at $_ in the sub but what would the second one be?
Simple example would work. Thanks guys!