I wanted to dynamically name the worksheet without using any of the perl modules.
You may play with HTTP protocol and use a "two passes" download, making your cgi act as a filter:
- When solicited, make your cgi reply with an HTTP 302 response (object moved) and give a new location attribute such as: <url_to_cgi>/<path_to_filename>.
- According to HTTP response, the client browser will requests again the datas from your cgi giving you back the filename from 1st pass. You'll know which one is the current pass via $ENV{'REQUEST_URI'}. Don't forget to set the mime/type.
____
HTH, Dominique
My two favorites:
If the only tool you have is a hammer, you will see every problem as a nail. --Abraham Maslow
Bien faire, et le faire savoir...