sub PUSH { my ($aref, @new) = @_; carp "first parameter must be an array reference" unless ref $aref eq 'ARRAY'; ... } #### sub NAMED_PUSH { my(%args) = @_; carp "dest_aref parmeter must be an array reference" unless ref $args{dest_aref} eq 'ARRAY'; ... }