in reply to Using doublequotes in a system call

One thing that might help is the way you open a file. I believe the code you have has the filename/filehandle backwards. That's probably why you're getting the No Such File or Permission Denied errors.
open(FILEHANDLE, "filename.xxx");
Hope this helps you out at least a little. -Eric