I feel a bit bad about myself now lol! Anyway, I hope I'll learn. At some point. In all honesty yes I did hope it would work, but I din't just throw it in, I spent quite a lot of time on this rubbish code I wrote. I have completed a Perl tutorial and I have read perlintro, so obviously I'm just not very talented in coding if I manage to make one million mistakes in 10 lines. I'll try to study all your suggestions now, thank you very much Ken.