Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Naming a Worksheet in Perl

by dfaure (Chaplain)
on Aug 10, 2004 at 11:16 UTC ( [id://381517] : note . print w/replies, xml ) Need Help??


in reply to Naming a Worksheet in Perl

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:

  1. 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>.
  2. 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...