Threads are supposedly much better under perl 5.8 than they were under 5.6 (although I've not personally tried them yet). Try 'perldoc perlthrtut' if you have perl 5.8 installed, it's a pretty good primer for getting started with perl threads.
If threads don't work out, you can always use fork() (see p715 of the Orielly book, 3rd ed). However, in my experience fork() hasn't worked as well under Windows as it has on the Unix-like platforms. YMMV. HTH, - Mark On Fri, 24 Jan 2003, Robert Vaughn wrote: > Date: Fri, 24 Jan 2003 10:31:04 -0800 (PST) > From: Robert Vaughn <[EMAIL PROTECTED]> > To: Perl <[EMAIL PROTECTED]> > Subject: Multithreading or multiprocessing - trying to learn > > This is a newbie style email... please forgive me. > > I write a lot of perl both on Windows and Linux. > However, my life has been sequential up to this point. > I don't know how to multithread. > > I primarily use Perl 5.005_03. I have lots of legacy > code to support. > > I am trying to come up with a method of > multi-threading or multi-processing that is portable > across Linux and Windows. Most of my servers are 4X > Intel-based servers. > > I have read about multi-processing through processes > assigned to file handles. Didn't make much sense. > > I have also read that Perl is problematic for threads. > > The application that I have in mind is a program that > can open multiple files (maybe four files) at the same > time and search through the files using regular > expressions. > > I'm kind of stuck on how to do this in a > multi-whatever processing model. I can do it > sequentially easily but then the files are out of > sync. > > What I'm looking for are some examples of > multi-processing or multi-threading that work across > Linux and Windows. > > Thanks for the help, > ...Robert > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > _______________________________________________ > ActivePerl mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
