euglug.org

[Eug-lug] simple downloading in perl

작성자

카테고리:



Jacob MeuserMon Dec 13 22:20:55 PST 2004

On Mon, Dec 13, 2004 at 09:54:43PM -0800, Christoph Otto wrote:
> I've got a perl script written up that downloads files, among other
> things.  For my immediate purposes, using system("wget ...") works, but
> I'd like something that doesn't depend on the user having wget installed.
> Ideally, I'd like a windows user to be able to download and use the script
> without having to install any extra stuff, although this is definitely a
> long-term goal (if it's even possible).
> For now, I'd be happy with a portable way to download stuff in perl that
> doesn't depend on wget.  I don't need to do anything more elaborate than
> simply downloading, ie no posting, etc.
> Thanks.

I don't understand.  you don't want to use wget from perl, because
_windows_ users might not have wget and you don't want them to have
to install any extra stuff?  since when is perl included in windows
installs?

anyway, there are several ways to do it in perl, and I would say
to get rid of system() whenever possible, but maybe that's just me.

I believe Net::FTP comes with recent perl versions.

google for 'perl Net::FTP', the first hit is pretty good.

-- 
<jakemsr at jakemsr.com>