in reply to Changing value passed to sub

I don't know how you want a new handle assigned, but the following should show you how the references are meant to be done:
my_sub(\$handle); print $handle->[0]; sub my_sub{ my $handle = shift; if (handle_not_valid($$handle)) { $$handle = new_handle(); } } sub handle_not_valid { return !ref(shift); } sub new_handle { my @arr = (4,5,6); return \@arr; }