Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Unable to connect to some SFTP servers using Perl::SFTP

by skylinedreamer (Novice)
on Apr 09, 2013 at 08:45 UTC ( #1027680=note: print w/ replies, xml ) Need Help??


in reply to Re: Unable to connect to some SFTP servers using Perl::SFTP
in thread Unable to connect to some SFTP servers using Perl::SFTP

hm.. i dont have access to repair the modules. I guess i have to look into other options in tht case then :-)


Comment on Re^2: Unable to connect to some SFTP servers using Perl::SFTP
Re^3: Unable to connect to some SFTP servers using Perl::SFTP
by salva (Monsignor) on Apr 09, 2013 at 09:02 UTC
    If you only need to run your script on Linux/Unix systems, then, consider using processes (via fork) instead of threads.
      I enabled forks as follows by using system call to create a new terminal to run each ftp/sftp connection in a seperate perl script. It's able to execute but I am having issues when my parameters(@fields) contain bracket. I am not able to pass parameters which contains bracket.
      unless (fork()) { system("xterm -T $fields[0] -e \.\/uploader\.pl $index @field +s"); exit(0); }
      Error msg
      sh: syntax error at line 1: `(' unexpected
      After executing the window closes automaticaly. Is there a way to make it halt until the user press a key to exit or so. I tried to have a  <> at the end of the uploader script. But doesn't help
        Found a solution for the terminal to wait for user input from http://ubuntuforums.org/showthread.php?t=882185
        system("gnome-terminal -x bash -c './uploader.pl $index @fields; read +-n1'");
        But still I am not sure on how to fix the bracket issue.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-09-17 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (99 votes), past polls