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 7511735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:38:38+00:00 2026-05-29T23:38:38+00:00

I am uploading files from local to FTP using perl Net::FTP Module. After uploading

  • 0

I am uploading files from local to FTP using perl Net::FTP Module. After uploading the file, how can I get the status in a scalar variable that the file has been uploaded successfully or not? I am using the code that mentioned below.

use strict;
use Net::FTP;


my $ftp_connection=Net::Ftp->new('debian1.com');
$ftp_connection->login("myuser","password");
$ftp_connection->put('D:/to_upload/tested.xml','/root/received/tested.xml');
$ftp_connection->quit;

Please provide your valuable suggestions to implement the above task.
Is it possible to transfer the file as binary mode?

Note: I am developing this in Windows OS.

Thanks…

  • 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-29T23:38:41+00:00Added an answer on May 29, 2026 at 11:38 pm

    $ftp_connection->put('D:/to_upload/tested.xml','/root/received/tested.xml');
    code returns file name that is /root/received/tested.xml on success else it will return undef
    and for binary mode before put method add $ftp_connection->binary();
    hope below code will help you with your needs

    use strict;
    use Net::FTP;
    
    
    my $ftp_connection=Net::Ftp->new('debian1.com');
    $ftp_connection->login("myuser","password");
    $ftp_connection->binary();
    
    if($ftp_connection->put('D:/to_upload/tested.xml','/root/received/tested.xml')) {
        print "successful transfer"
    } else {
        print "unsuccessful transfer"
    }
    $ftp_connection->quit;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The overall goal: Copy the permissions of files from the local filesystem when uploading
I am writing code for uploading a file from a client to my server
I have 2 files namely: uploading.php emaillinks.php both include a file inc.php which has
In my node.js app I'm uploading a file (which is saved to local filesystem
I'm facing a simple problem I would like to get a local path from
When uploading a file through a local instance of fancy upload with Firefox, the
i have written a http handler for uploading multiple files from flex application. In
I'm wondering if it is possible, to upload a file from the local Computer
Am working on a project that requires uploading xml file to remote FTP site.
I have a file which can be edited from several different places over an

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.