in reply to sub routine trouble

It's because you make a copy of an array and a hash

sub upd_info () { $params1 = shift; %paramhash = %$params1; # COPY!! $params2 = shift; @paramarray = @$params2; # COPY!!

You may use $params1->{$key} and $params2->[$index] notation to achieve what you want