Thanks for the response, I should mention that I'm a noob to perl and my original code came from copying from other scripts and help from others. The bits in the code that say = ...; is this what I would actually write in the script or do I need to put something else in the space. Sorry, I'm a bit lost! I usually use bash and started using perl recently!