Hi again,
The version of CGI i am using is 2.56. I tried the error suggestion (with: else { print "no error"}) on the end. When I submit the data.txt file it prints the contents of the old data.txt + no error. If i submit anything else nothing prints. This is driving me crazy!!
p.s the $filename / $name thing wasn't a typo, but i can't see whats wrong with that!? ;-)