Find the answer to your Linux question:
Results 1 to 2 of 2
I'm not good on perl scripting but I have some knowledge on bash scripting. I need to modify a perl script. As of the moment, it is dumping to a ...
  1. #1
    Linux Newbie
    Join Date
    Mar 2006
    Posts
    101

    help in perl how to output on the remote server

    I'm not good on perl scripting but I have some knowledge on bash scripting.

    I need to modify a perl script. As of the moment, it is dumping to a file in their home directory. I need to output it also to one of my server outside the network. I'm doing it via ssh using empty passphrase key. Could anyone give a suggestion on how I could do that.

    Here is the sample snippet. How could I redirect to output of SPAMCFG to my remote server instead to $homedir.

    open(SPAMCFG,">$homedir/mailspamcheck_settings.pl");
    print SPAMCFG ("#\!\/usr\/bin\/perl\n\n\n");
    print SPAMCFG ("#whitelist $username start\n");

    Is is possible that I could output the SPAMCFG to my remote server using SSH??

    open(SPAMCFG,"><REMOTE SERVER USERS's MAILDIR>/mailspamcheck_settings.pl");
    print SPAMCFG ("#\!\/usr\/bin\/perl\n\n\n");
    print SPAMCFG ("#whitelist $username start\n");

  2. #2
    Linux Newbie
    Join Date
    Mar 2006
    Posts
    101
    I just found out that there is a module on perl for ssh "Net::SSH::Perl"

    I just need to know how to use it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...