in reply to Re^6: Shell to Perl conversion
in thread Shell to Perl conversion

You won't be able to handle any password prompt by ssh in your script. This is why I mentioned passwordless keys. Also, there is little difference between `/bin/sh ...` (and throwing the result away) and system(). If the backticks work for you, you can now move the contents of the shell script into that command line and use that.

You might want to read up about backticks in perlop - you don't need redirection with backticks because they return the script output:

my @output = `/bin/sh ...`; print "I got: @output";

Let me repeat: You won't be able to supply a password to sudo or ssh.

Replies are listed 'Best First'.
Re^8: Shell to Perl conversion
by rockmountain (Sexton) on Sep 01, 2008 at 08:25 UTC
    I found out that In my CGI script, the Form data is not being transffered from webpage to underlying script. What could be the workaround for ward of the permission problem between, Operating system user and Webinterface user.
    cheers Rock

      I don't see how this question relates to your original question. Maybe you can post the script together with a description of the problem. Or maybe you can debug it yourself. For example, usually the web server error log has a detailed description of the problems Perl or the webserver encounter.

      I cannot suggest a workaround because you describe the problem quite poorly.