[ale] retrieving a file via ftp in perl
Geoffrey Myers
lists at serioustechnology.com
Mon Nov 29 14:34:39 EST 2010
Scott McBrien wrote:
> I doubt that it'll work the way you want, the problem is that you
> have to open up the file for io in order to read it into the array.
> If the file isn't resident on your machines filesystem, that doesn't
> work so well. FTP isn't really designed to give inline access to a
> file as it doesn't have a way to open and maintain the state of the
> file mid-transfer. I'd suggest getting the file, putting it in /tmp
> or /var/tmp, then use the standard perl io stuff to work with it.
> You can always unlink the file once it's been read into your program
> if that disk space is a concern.
Yeah, that was my expectation, but I was hoping I could do this without
writing the file out. Thanks.
>
> -Scott
>
> On Nov 26, 2010, at 3:20 PM, Geoffrey Myers
> <lists at serioustechnology.com> wrote:
>
>> I would like to retrieve a file via perl using ftp, but I want to
>> read the file into an array in perl, rather then drop it on the
>> machine as a file. Anyone know if this is possible? I don't see
>> such functionality with Net::FTP.
>>
>>
>> -- Until later, Geoffrey
>>
>> "I predict future happiness for America if they can prevent the
>> government from wasting the labors of the people under the pretense
>> of taking care of them." - Thomas Jefferson
>> _______________________________________________ Ale mailing list
>> Ale at ale.org http://mail.ale.org/mailman/listinfo/ale See JOBS,
>> ANNOUNCE and SCHOOLS lists at http://mail.ale.org/mailman/listinfo
>
> _______________________________________________ Ale mailing list
> Ale at ale.org http://mail.ale.org/mailman/listinfo/ale See JOBS,
> ANNOUNCE and SCHOOLS lists at http://mail.ale.org/mailman/listinfo
--
Until later, Geoffrey
"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson
More information about the Ale
mailing list