in reply to Benchmark array passing Question
my ($low,$high) = (0,scalar(@$array)); # computes the length of the a +rray and gives it to $high
You have an off-by-one error. The value scalar(@$array) is not a valid index to any of the values in @$array.
my ($low,$high) = (0,$#$array); # computes the length of the array an +d gives it to $high
|
|---|