> Beau E. Cox wrote:
> 
> >On Thursday 24 June 2004 08:32 pm, Charlene Gentle wrote:
> >  
> >
> >You can use the 'system' command:
> >
> >##--master--
> >...
> >my $rc = system "perl slave.pl";
> >...
> >  
> >
> Does this mean it runs in parallel with the parent Perl Program?  
> Reading through "Learning Perl 3rd Edition" and I thought I caught a 
> reference to something like this.
> 
> Just curious.
> 

Not exactly, it has been forked and does technically run in parallel,
however 'system' blocks your current process waiting for the child to
finish, so your process is in fact running, but it won't be doing any
work except for waiting for a signal from the child.

There are other ways to have parallel execution,

perldoc perlipc
perldoc -f fork
perldoc -f system

Will get you started. "Network Programming with Perl" by Lincoln Stein
also has excellent chapters on this subject, though lacks a chapter
(probably because of its age) on POE.

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to