in reply to Passing array and hash together : Solved
In your routine_2 the @array consumes all of the remaining elements of @_ because the routine has no idea of where the array ends and the hash reference starts. You could either change the order so the the hash reference comes before the array or, probably better, change the array to an array reference.
... routine_2( $num, \ @array, \ %fruit ); ... sub routine_2 { my( $num, $aref, $href ) = @_; ...
I hope this is helpful.
Cheers,
JohnGG
|
|---|