in reply to threading a perl script
Ignoring the question of whether you should use threads, see threads for how you could use them.