Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: system call to ftp

by GrandFather (Cardinal)
on Mar 24, 2012 at 05:46 UTC ( #961357=note: print w/ replies, xml ) Need Help??


in reply to system call to ftp

That just ain't gonna fly! system is somewhat like logging on, executing a command line, then logging off again (under the hood it forks then execs the command and waits for the forked process to terminate). You would most likely be much better off using a module such as the Net::FTP module you mention to get the job done.

True laziness is hard work


Comment on Re: system call to ftp
Re^2: system call to ftp
by Anonymous Monk on Mar 24, 2012 at 11:14 UTC
    Okay, Agreed .But the other system which the script going to be put into run,may or may not have Net::FTP (old perl version) or its dependent packages which in turn gives problem , ie why i tried to use system, Anyhow i have partially fixed the problem ,
    .... system("ftp -n -s:ftpcred.txt $host > out.txt"); .... # file:ftpcred.txt #================== user root xxxx ls quit
      FYI, Net::FTP is a core dual-lived module. If the other system has perl installed, then it has Net::FTP.

        corelist -d Net::FTP Net::FTP was first released with perl v5.7.3

        Sigh ... 5.7.3 was released 10 years ago. If you're restricted to perls older than 5.7.3, I'll say a prayer for you.

        -derby
        You mean , this package is available from the first release of perl ? and it will run on every boxes with different linux/unix/windows flavors?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://961357]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2014-09-21 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (166 votes), past polls