RPrinceton
Programmer
Hi Everyone,
The code snippet below works to download only ONE file.
How can I modify the code to download multiple files? Repeating the code with another file name does not work. Please advise.
Thx in advance.
Regards,
RPrinceton
Code snippet that works to download one file:
open(FILEm"/home/public_html/docs") || die "Cannot open file ($!)";
print "MIME-Type: 1.0\n";
print "Content-Disposition: attachment; filename=abc.doc\n";
print "Content-type: application/octet-stream\n\n";
while(<FILE>){print $_; }
close(FILE)
The code snippet below works to download only ONE file.
How can I modify the code to download multiple files? Repeating the code with another file name does not work. Please advise.
Thx in advance.
Regards,
RPrinceton
Code snippet that works to download one file:
open(FILEm"/home/public_html/docs") || die "Cannot open file ($!)";
print "MIME-Type: 1.0\n";
print "Content-Disposition: attachment; filename=abc.doc\n";
print "Content-type: application/octet-stream\n\n";
while(<FILE>){print $_; }
close(FILE)