Leser: 1
5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
open(F, "files/data.zip");
binmode(F);
print "Content-Type: application/octet-stream;\n";
print "Content-Disposition: filename=data.zip;\n\n";
foreach $i (<F>){
$i =~ s/[\n\r]{2}/\n/g;
print $i;
}
close(F);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
binmode STDOUT;
open F, "< files/data.zip";
binmode F;
print "Content-Type: application/octet-stream\n";
print "Content-Disposition: filename=data.zip\n\n";
my ($len, $off, $data) = (0, 0, undef);
while(len = read(F, $data, 1024, $off))
{
print STDOUT $data;
$off += $len;
}
close F;
5 Einträge, 1 Seite |