Thanks for that. I am new to perl. I have placed the text file in the same directory as the cgi file. This is why I have not added a path. Is this the right thing to do?
Usually, that should work, but I think some server configurations can mess with the current directory. Please either check the server error log or use the fatalsToBrowser construct to see what is really going wrong. Don't leave us (and yourself) guessing.