Re: Get .exe or .zip file from the server via perl script
From: Nicolay A. Vasiliev (nicol_at_mail.ru)
Date: 08/04/04
- Next message: Thomas bätzler: "RE: E-mail Parsing"
- Previous message: Richard A. Evans: "Re: Re: Determining Odd and Even Numbers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: Wed, 04 Aug 2004 14:58:51 +0400
Hello, Gunnar!
Thanmk you and sorry for delay!
Gunnar Hjalmarsson wrote:
> Nicolay A. Vasiliev wrote:
>
>> I don't know anything how to download the file via perl script.
>
>
> This code, which I copied from a program of mine, may get you started:
>
> open FILE, "< $dir/$file" or die "Can't open ... $!";
> binmode FILE;
> binmode STDOUT;
> print "Content-Type: application/zip\n",
> "Content-Disposition: attachment; filename=$file\n",
> 'Content-Length: ' . (stat "$dir/$file")[7] . "\n\n";
> while (<FILE>) { print }
> close FILE;
>
- Next message: Thomas bätzler: "RE: E-mail Parsing"
- Previous message: Richard A. Evans: "Re: Re: Determining Odd and Even Numbers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]