Hmmm. I tried doing this, and apparently it DID print to the file, as the file now exists, but it says there is an error in permissions, and won't let me open it. Any ideas?
Sorry i missed
That you have to close the file, under Linux i could read the file anyway but i have hade troble with this under Windows, that a open file don't give you right to read.
add Close as below example
select STDOUT;
close(DEBUG); # Close the debugfile
print "And now we back\n";