in reply to Uploading a file
Adding use strict to your code and checking the return value from your call to open would no doubt give useful clues.
"The first rule of Perl club is you do not talk about Perl club." -- Chip Salzenberg