in reply to update a file
Well, for one thing, you're not actually printing any data into the file anywhere in that code.
"The first rule of Perl club is you don't talk about Perl club."