in reply to problem opening and reading from a file
This is just a guess, but I think read is a reserved word. Does the script work if you change READ to soemthing else, like READDATA?
Update: Added code markers.
In Section
Seekers of Perl Wisdom