using a function with net::ssh

Discussion in 'Perl Misc' started by usaims, Mar 9, 2007.

  1. usaims

    usaims Guest

    Hello:

    This is my objective. I'm trying to ssh into a linux node, open a file
    and display the contents on my terminal, below is the code. I'm
    getting the following error:
    bash: -c: line 1: syntax error near unexpected token `0x91134c8'
    bash: -c: line 1: `CODE(0x91134c8)'

    Does anybody have a clue?
    ########################################
    #!/usr/bin/perl -w
    use warnings;
    use strict;
    use Net::SSH qw(ssh issh sshopen2 sshopen3);
    my $variable = \&FUNCTION;

    ssh('', $variable );


    sub FUNCTION {
    open(FILE, "/stuff/log.txt");
    print FILE;
    }
    ########################################
     
    usaims, Mar 9, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. loial
    Replies:
    0
    Views:
    441
    loial
    Feb 3, 2009
  2. Tench Johnson
    Replies:
    1
    Views:
    330
    Biff Tannen
    Apr 23, 2010
  3. salamond

    net/ssh in ruby. ssh.exec fails

    salamond, Feb 17, 2011, in forum: Ruby
    Replies:
    0
    Views:
    278
    salamond
    Feb 17, 2011
  4. Deepika
    Replies:
    2
    Views:
    239
    Deepika
    Nov 14, 2006
  5. Replies:
    0
    Views:
    134
Loading...

Share This Page