in reply to Re: threading a perl script
in thread threading a perl script

And if you're already using the best algorithm available and it is still too slow?

Replies are listed 'Best First'.
Re: threading a perl script
by Boetsie (Sexton) on May 11, 2011 at 13:14 UTC

    Thank you all for the kind replies, i'll not include threading in my script after each time i read in a line. However, i'll try to thread multiple files, since i have multiple large files all to be processed the same way. I think i can thread these together, am i right?

    Next question; how can I thread for example 3 files and then wait till one is finished and then the next file can be processed. In other words; how can i process, for example, always 3 files at the same time?

    Kind regards, Boetsie
      In other words; how can i process, for example, always 3 files at the same time?

      It depends. You simple are not giving enough of a description of what you are doing to the files, and what you hope to gain by the use of threading, for anyone to be able to hazard a guess as to how it might be best done.

      If you posted a sample of the contents of these files; along with a tally of how many and how big these files are and how long it takes to process them and most importantly, the code you are using to process them; you might get some useful answers.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.