in reply to Passing references to array slices

your code is passing an arrayref, which is a scalar. $ArrayOfValues_REF is picking up @_, an array. $_[0] is your arrayref that you are passing, not @_. $ArrayOfValues_REF = shift should work.