Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7651501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:31:23+00:00 2026-05-31T11:31:23+00:00

I’m writing a test for an FTP server in Perl, but I cannot get

  • 0

I’m writing a test for an FTP server in Perl, but I cannot get the messaging I want. Currently I wrote a mini program that looks like this;

my $ftp = Net::FTP->new($host, Debug => 0) or die "Cannot connect to $host: $@";
print @{[ $ftp->message ]}, "\n";

Which works wonderfully, but my response is;

FTP SERVER

Instead of the actual response;

220 FTP SERVER

I cannot find any information other than the basic methods and options. Does anyone know where to find the full documentation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:31:24+00:00Added an answer on May 31, 2026 at 11:31 am

    First complete documentation for Net::FTP is available at the Perl Programming Documentation website. It’s a very nice little page showing all the standard Perl modules, Perl tutorials, Perl language guides, the FAQ, and other built-in Perl documentation. That’s right, all of the information on this website is already on your computer.1

    All you need is the perldoc command. For example, what does the Perl function shift do?

       $ perldoc -f shift
       shift ARRAY
       shift   Shifts the first value of the array off and returns it,
               shortening the array by 1 and moving everything down.  If there
               are no elements in the array, returns the undefined value.  If
               ARRAY is omitted, shifts the @_ array within the lexical scope
               of subroutines and formats, and the @ARGV array outside a
               subroutine and also within the lexical scopes established by
               the "eval STRING", "BEGIN {}", "INIT {}", "CHECK {}",
               "UNITCHECK {}" and "END {}" constructs.
    
               See also "unshift", "push", and "pop".  "shift" and "unshift"
               do the same thing to the left end of an array that "pop" and
               "push" do to the right end.
    

    Almost all modules have the same built-in documentation. Since Net::FTP is part of the standard Module set, you can simply say perldoc Net::FTP and get the complete documentation.

    This is part of the Perl POD (Plain old doc) documentation system. If you’re serious about Perl programming, I suggest you learn about Perl POD and use it in your scripts. In fact, there’s a nice standard module called Pod::Usage that can be used to display program help text directly from your POD documentation.

    Okay, but what if the complete documentation for that module …uh what’s the technical term? Oh yeah… sucks? What if the documentation simply doesn’t contain the information you’re looking for?

    In that case, you’re going to have to roll up your sleeves and dive deep into the code. Again, perldoc can help you there too:

     $ perldoc -l Net::FTP
     /System/Library/Perl/5.12/Net/FTP.pm
    

    Now, you know where the module is stored on your system. You can now use your favorite editor to go through the code.

    Just one more tiny thing: In Net::FTP‘s code, there’s this statement:

    @ISA     = qw(Exporter Net::Cmd IO::Socket::INET);
    

    That means that Net::FTP is a sub-class of Net::Cmd and IO::Socket::INET. You might have to do a perldoc on these modules to find out more information. It could very well be that the error message you’re getting is being generated by one of these two classes, and not by Net::FTP.

    I can see in the code that the message you’re getting is from Net::Cmd->message. You might have to dig through that to see why you’re not getting the message you think you should. From what I can see, it looks like it’s simply returning the message from the FTP server itself. It could be that the FTP server you’re connecting to is based upon older code that doesn’t return the response code.


    1 Note that the default documentation for the Perl Programming Documentation website is for Perl 5.14 which may or may not be your Perl version. You can adjust the Perl version via the drop down menu on the left of the webpage. Still, for a wide variety of reasons this website might not reflect your version of Perl installed on your system.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I want to construct a data frame in an Rcpp function, but when I
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.