Careful...

On 05/30, A. Rivera said something like:
> You would do something like
> 
> foreach $value(@ARGV)
> {
>     fork()
> }
> 
> Regards,
> Agustin Rivera
> Webmaster, Pollstar.com / PollstarOnline.com
> 
> ----- Original Message -----
> From: "Ho, Tony" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 30, 2002 8:09 AM
> Subject: Launching Perl Code in Parallel
> 
> 
> > Hi Guys
> > I was wondering if you could help me.
> >
> > I have a perl program, get_ice_cream_descriptions.pl, that accepts 2
> > arguments
> >
> > For example,
> >
> > get_ice_cream_descriptions.pl  1  10
> >
> > However, I would like to get ice cream descriptions for other ranges at
> the
> > same time, such as 11 - 20, 21 - 30, 31 - 40, 41 - 50 etc
> >
> > I could write an external file that contains the following :
> >
> > get_ice_cream_descriptions.pl  1   10 &
> > get_ice_cream_descriptions.pl  11  20 &
> > get_ice_cream_descriptions.pl  21  30 &
> > get_ice_cream_descriptions.pl  31  40 &
> > get_ice_cream_descriptions.pl  41  50 &
> >
> > This way I could execute the perl code in parallel and eventually get the
> > descriptions.
> >
> > Instead of using the above method, I would prefer to write some code in
> > get_ice_cream_descriptions.pl accept different number ranges and launch
> > itself.
> > I have been looking at the fork() command.
> > I believe fork() only creates a copy of the original process but I wasn't
> > quite sure how I could pass the different number ranges into the perl code
> > before it forks itself.
> >
> > Any advice would be appreciated.
> > Many Thanks
> > Tony
> >
> >
> >
> >
> >
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
--
Shawn Leas
[EMAIL PROTECTED]

The Bermuda Triangle got tired of warm weather.  It moved to
Alaska.  Now Santa Claus is missing.
                                                -- Stephen Wright

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to