Sorry, original message had wrong address for this list and I didn't
notice.  Here is the chain.

Regards,

Jeff



---------- Forwarded message ----------
From: Jefferson Kirkland <numberw...@gmail.com>
Date: Sat, Jul 18, 2009 at 9:17 PM
Subject: Re: NET::FTP object constructor's host option as array reference
To: Corey Foote <coreyfo...@hotmail.com>
Cc: beginners-h...@perl.org


While I am sure that someone here can figure out the issue with the array
reference, I am not in a good mind state to mess with it.  I would cycle
through the array with a foreach as shown on this
page<http://aplawrence.com/Unixart/perlnetftp.html>.
As shown on there, this gives you control over the connection to each and
you can either use it to test the connections, or try each until
connection.

Regards,

Jeff




On Sat, Jul 18, 2009 at 4:44 PM, Corey Foote <coreyfo...@hotmail.com> wrote:

>
> I'm building an FTP client using NET::FTP. The documentation states that
> the new constructor has a host option which can be a reference to an array
> with hosts to try in turn. I don't seem to be able to get this to work. I'm
> using ActivePerl under Windows XP. Here's my code:
>
> @try_these = ("turing.unh.edu", "euler.unh.edu");
> $ftp = Net::FTP->new(Host => @try_these)
> or die "Can't connect: $...@\n";
>
> And here's the error message:
>
> Can't connect: Net::FTP: Bad hostname 'Host'
>
> Any ideas? Thanks guys!
> _________________________________________________________________
> Bing™ brings you maps, menus, and reviews organized in one place. Try it
> now.
>
> http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TXT_MLOGEN_Local_Local_Restaurants_1x1

Reply via email to