in reply to setting values inside subroutine
sample($t,0); sub sample { my $t = shift; my $index = shift; my ($p, @r, $v, $rt); $t->get_handles(params=>\$p, rtrs=>\@r, vars=>\$v, t=>\$rt); my @subs; if (defined $index) { my $rh = $r[$index]; <some command at execution> } else { foreach my $rh (@r) { <some command at execution> ... } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: setting values inside subroutine
by Anonymous Monk on Sep 16, 2015 at 12:29 UTC |