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

  • Home
  • SEARCH
  • 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 3756758
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:54:05+00:00 2026-05-19T09:54:05+00:00

I’m using the Net::FTP::File module to get a list of directories in a remote

  • 0

I’m using the Net::FTP::File module to get a list of directories in a remote path. It seemed to work fine until I stepped on this case where a directory named en shows up as just n, details:

'n' => {
    'Bytes' => '4096',
    'Group' => 'client3',
    'Owner' => '5004',
    'Path' => 'n',
    'Last Modified Year/Time' => '17:59',
    'Permissions' => 'drwxrwxr-x',
    'Last Modified Day' => '17',
    'Link To' => undef,
    'Number of Links' => '7',
    'Last Modified Month' => 'Jan'
},

the directory on the server has the correct name (en) same owner/group/permissions as other directories that display fine.

I reduced the test case to the minimum so I know the problem doesn’t depend on other bugs:

#!/usr/bin/perl

use strict;
use warnings;
use Net::FTP::File;

use Data::Dumper;
$Data::Dumper::Terse  = 1;
$Data::Dumper::Indent = 1;

my $ftp = new Net::FTP($site);
$ftp->login($user, $pass);
print Dumper $ftp->dir_hashref;

is there anything I’m doing wrong that might cause this error? Or is it a bug in the dir_hashref() function of the module?

Alternatively, what’s another (convenient) way to get only the directories in an FTP list? Standard Net::FTP provides the dir() method, but it’s just a list of ls -l like strings that have to be parsed.

  • 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-19T09:54:05+00:00Added an answer on May 19, 2026 at 9:54 am

    I’d be inclined to suspect the filename contains an unusual character.

    Do you see the file with the correct name if you use a normal FTP client to connect to that server?

    Try passing the Debug parameter to the Net::FTP constructor, for instance:

    my $ftp = Net::FTP->new($hostname, Debug => 1);
    

    That should get you some more debug info, in particular the dialog between your script and the server, which will likely be of use.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am using parse_ini_file to read the contents of a file however it is
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I want use html5's new tag to play a wav file (currently only supported

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.