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; }
In reply to Re: Changing value passed to sub
by TedPride
in thread Changing value passed to sub
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |