That being said, here's my problem. I have a bunch of perl scripts that work just fine on my old linux box. Now, I have a shiny new desktop with two quad processors. The system install of perl is built with threading enabled by default. This is great for some scripts, but it causes others to die when a line of code that depends on results from a previous line gets executed before the previous line has finished its job (for instance, a system() call creates a file, but the code tries to access the file before the system call is done making it).
I don't want to install my own local version of perl, or have the syshelp people reinstall perl without threading, since I get a benefit in some cases. I also don't want to have to re-write all of my code line by line to make sure it's robust to threading. What is the most elegant and most SIMPLE solution here? Is there a way to run a perl script without threading "turned on" under thread-enabled perl? Do I really have to litter my scripts with statements like "if threading is enabled do this, otherwise do this" if I want them to run under threaded and non-threaded perl?It seems like this should be simple, but I haven't had any luck so far, so any advice will be appreciated.
In reply to Runing "regular" code with threaded perl by kingskot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |