in reply to Adding a download link with perl CGI

I don't know what you mean by "strictly use html", but if you want to send a file for the user to download, you just send the appropriate headers and then the file content. The appropriate headers are Content-Type and Content-Disposition: attachment; filename="example.csv".

With CGI, sending headers is basically:

print $cgi->header( -type => 'text/csv', -Content_disposition => qq{attachment; filename="$target.csv"}, );