thanks for that. I tried first option but having problems picking up correct files and printing. doesn't seem to recognise *.pl and I'm wondering whether using the current directory is causing a problem. First return off print statement looked like the opening screen of the matrix