Hi,

Does this work ah?

#!/usr/bin/perl
use strict;

my($Bytes,$fhandle,$Buffer);
my $file = 'yourfile.ext';
open(FILE, ">$file") or die print "Could not open $file: $!\n";
        while ($Bytes = read($fhandle,$Buffer,1024)) {
            print FILE $Buffer;
        }
        close($fhandle);
close(FILE);

__END__



"Connie Chan" <[EMAIL PROTECTED]> wrote in message
001d01c23336$1140b8a0$[EMAIL PROTECTED]">news:001d01c23336$1140b8a0$[EMAIL PROTECTED]...
> > Content-type: application/octet-stream
> > Content-Disposition: attachment\; filename=$file
>
> This seems IE way, if I don't remember it wrongly,
> this does not work at NS
>
>
> Anyway, how about this ?
>
> $| = 1;
>
> my $file = 'yourfile.ext';
>
> print "Content-type: application/(your file type)\r\n\r\n";
>
> open FH, $file;
> binmode(FH); binmode(STDOUT);
> until (eof FH) { read (FH, my $buf, 1) ; print $buf }
> close (FH);
>
> unlink ($file);
>
> #####
> Code not tested, try it if you would like to =)
>
> Rgds,
> Connie
>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to