Hi lee,

On Sat, 13 Feb 2016 14:17:54 +0100
lee <l...@yagibdah.de> wrote:

> Hi,
> 
> how can I make it so that my cgi program displays information on a web
> page it sends to a user's web browser /and/ then makes the browser's
> download dialog-box come up to let the user download a file?
> 
> It seems that making the web browser wanting to download a file is only
> possible by sending appropriate page headers.  Since those have already
> been sent to display the text on the web page, I can't seem to make the
> browser download the file automatically.
> 

CGI (= the https://en.wikipedia.org/wiki/Common_Gateway_Interface  protocol
which isn't Perl-specific) allows you send some extra headers to the server, in
the headers section before the first "\n\n". Which CGI library/framework are you
using? In this day and age Plack is recommended:

http://perlhacks.com/2016/01/easy-psgi/

Regards,

        Shlomi Fish

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to