Send a file

[email protected] ("Beginner")
Newsgroups perl.beginners.cgi
Message-ID <[email protected]>
Hi,

I am trying to send a file in response to a request but am having 
trouble.

Here's what I have so far. I am not certain what the headers should 
be. I am not getting any more info from my error_log except Premature 
end of script headers.


my $s = (stat($file))[7];

my $filename = $user.'.csv';
seek $fh,0,0;
print header(-type=>"text/tab-separated-values",-Content_length=>$s, 	
	-Content_Disposition=>"attachment;filename=$filename");
print $fh;
close($fh);


Can anyone offer some advice?
Thanx,
Dp.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.