Methinks, herein lies the problem. If you give them a link, they will be able to come back and download the file again unless
- you give them link that expires after the first download (temporary session id)
- you give them a user/password where the account expires after the first download
You could mod_rewrite or alias the script folder but this wouldn't prevent multiple downloads.
Slurp the file into your perl script.
Send file out by printing to stdout.
You will have to set the headers...based upon what type of file you are sending.
This allows you to put the file in any directory and add management options as you see fit....
I don't think that you have to actually use binmode (may be deprecated)...but it's the concept.