How to use ncftp in perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ssorower
    New Member
    • May 2007
    • 23

    How to use ncftp in perl

    Hello guys!
    I need to know how can I use ncftp commands in perl. I can use simple ftp and sftp commands as perl has its NET:: modules for them..but I was unable to find such for ncftp.

    Thanks in advance for any help :)

    Sorower
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #2
    Welcome Sorower,

    I would advise you to simply use Net::FTP. However, if there is some special command that ncftp supports that Net::FTP does not, then you'll have to wrap your use of ncftp with Expect.

    cpan Expect

    It will not be easy to code for every eventuality, but you could automate the use of ncftp using this module.

    - Miller

    Comment

    • ssorower
      New Member
      • May 2007
      • 23

      #3
      Thanks a lot Miller.

      This module looks very useful. I am going to use that.

      Actually I have my Expect codes which can handle ftp, sftp and ncftp according to my needs. I was planning to migrate to perl.

      Is there any advantage that perl gives over Expect in secure automatic file transfer issue?

      I know perl but never used in secure file transfer cases. Expect had been very useful in this case so far.

      --Sorower

      Comment

      • miller
        Recognized Expert Top Contributor
        • Oct 2006
        • 1086

        #4
        Honestly Sorower, I've never used Expect. I simply know that it is the module that is used to automate certain tasks when there is not a perl module to handle it.

        I've yet to come by a circumstance where I needed it, which is why I first advised you to just stick with Net:: modules. Nevertheless, I'm certain that it is simply a case of sticking with what's familiar.

        - Miller

        Comment

        • ssorower
          New Member
          • May 2007
          • 23

          #5
          You are absolutely right about Expect Miller.

          The reason I was thinking of perl is just to have the future expansion facility to cover few more features on the same scripts.

          I will try with NET module.

          Thanks a lot for your help :)

          Sorower

          Comment

          • miller
            Recognized Expert Top Contributor
            • Oct 2006
            • 1086

            #6
            Your welcome Sorower. Hope it works out.

            - Miller

            Comment

            Working...