Oh geez. Let's not bring in the multi-thousand-line CGI.pm module for what's fundamentally a one-liner. I mean, I know this thing'll be run once every blue moon or so, but I object to the code above for purely aesthetic reasons.
Once you get your 404 issues solved, recode it to be:
Also, be sure you FTP'ed it to your server in ASCII mode. Sending it in BINARY mode will break it.