in reply to Arrays and Scalar Parameters

You can't easily return an array and a scalar - the array is going to consume all the returned values (the scalar included).

In this case it's best to just return a ref to the array as well as the scalar like so:

sub do_something { ... return \@someValues, $someValue; } ($someValues_aref, $endValue) = do_something();
Without using references you would have to do something like this:
(@someValues) = do_something(); $endValue = pop(@someValues);
Messy, but it would get the job done.