You could use references to achieve this.
. . . my_sub(\$handle); . . . sub my_sub{ my $handle = shift; if (handle_not_valid($$handle)){ $handle = \(new_handle()); } ... }
Regards,
PN5
In reply to Re: Changing value passed to sub
by Prior Nacre V
in thread Changing value passed to sub
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |