Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
PierreTheMime
Dec 9, 2004

Hero of hormagaunts everywhere!
Buglord
Alright, I have a Perl question. Well, actually two if you include "why am I using Perl".

I'm using an install of Perl 5.20.1 on AIX Unix and I am being told that the following code is wrong:
code:
#!/usr/bin/perl
use Net::FTP;

$ftp = Net::FTP->new("<INSERTFQDNHERE>", Debug => 1)
    or die "Cannot connect! $@";
Error: Cannot connect! Net::FTP: connect: Invalid argument at line 4.

Ultimately I need to apply a Passive argument to this constructor as well but I removed it to ensure that wasn't the cause. This is basically straight lifted from their documentation and I have no idea why it's failing. I've tried changing the server to a variety of values including the IP address, tried single quotes instead of double. Help. :(

PierreTheMime fucked around with this message at 22:30 on Jul 12, 2020

Adbot
ADBOT LOVES YOU

PierreTheMime
Dec 9, 2004

Hero of hormagaunts everywhere!
Buglord

PierreTheMime posted:

Net::FTP: connect: Invalid argument at line 4.

So apparently this issue was that the FTP host was refusing the connection and my code was not invalid. The exact same code to another server worked just fine. Very helpful error message :thumbsup:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply