carric has asked for the wisdom of the Perl Monks concerning the following question:
So, now I have it doing:if ($a) { foreach $a (@a) { print $a; discover ($a); } } if ($b) { print $b: discover ($b); } sub discover { ## do lots of repetitive stuff }
So, obviously calling a function from within this manager construct must not be how to do it, because "she ain't workin'". I am not sure if I'm calling it from with an object, or a method, or what.. it makes it significantly harder to find something when you don't know what to call what you are looking for. Thank you in advance for any help.if ($a) { my $manager = new Parallel::Forkmanager( 10 ); foreach $a (@a) { $manager->start and next; print $a; discover ($a); $manager->finish; } if (b) { discover (b); sub discover { do lots of repetitive stuff }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calling a sub routine from an object
by tirwhan (Abbot) on Jan 05, 2006 at 09:55 UTC | |
by carric (Beadle) on Jan 05, 2006 at 17:55 UTC | |
by tirwhan (Abbot) on Jan 05, 2006 at 18:13 UTC | |
by carric (Beadle) on Jan 05, 2006 at 20:53 UTC | |
by Anonymous Monk on Jan 10, 2006 at 14:05 UTC | |
|
Re: Calling a sub routine from an object
by Anonymous Monk on Jan 05, 2006 at 19:51 UTC |