curl-library
Re: Still can't write to file in perl..need help =(
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 22 Jun 2004 11:01:40 +0200 (CEST)
Date: Tue, 22 Jun 2004 11:01:40 +0200 (CEST)
On Mon, 21 Jun 2004, Swati Vakharia wrote:
> ok..so from my other posts im slowly figuring this out..but i still cant get
> the data that i read from the ftp server to be written to a file. If I pass
> CURLOPT_FILE a normal variable, the data is stored into that file. But if i
> pass CURLOPT_FILE a file handle, nothing is getting printed. Any help would
> be appreciated! =)
...
> sub write {
> my ( $data, $pointer ) = @_;
> ${$pointer} .= $data;
> return length($data);
> }
Can you really write to a file by simply appending data to the file handle? I
thought you were supposed to do somehing like:
print ${$point} $data;
But I'm not a perl master.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-06-22