deprecated has asked for the wisdom of the Perl Monks concerning the following question:
the problem is, if sub_two is a help sub, i need it to be able to call all of the subs in @children, including itself.my @children = ( \&sub_one, \&sub_two, ); foreach my $child (@children) { if ($child -> (args)) { # $child was successful } else { # $child was unsuccessful } }
i suspect making my @children into our @children, i would solve my problem, but that strikes me as rather inelegant.
how can i make my children able to see eachother?
thanks,
brother deprecated
--
Laziness, Impatience, Hubris, and Generosity.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help with scoping (code), part 1
by Fastolfe (Vicar) on Nov 04, 2001 at 03:20 UTC | |
|
Re: help with scoping (code), part 1
by larryk (Friar) on Nov 04, 2001 at 02:12 UTC |