using a function with net::ssh



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('someuser@xxxxxxxxxxx', $variable );


sub FUNCTION {
open(FILE, "/stuff/log.txt");
print FILE;
}
########################################

.



Relevant Pages

  • Re: net::ssh and functions
    ... I'm trying to ssh into a linux node, ... and display the contents on my terminal, ... use Net::SSH qw(ssh issh sshopen2 sshopen3); ...
    (comp.lang.perl.misc)
  • net::ssh and functions
    ... I'm trying to ssh into a linux node, ... and display the contents on my terminal, ... use Net::SSH qw(ssh issh sshopen2 sshopen3); ...
    (comp.lang.perl.misc)
  • getting bash errors
    ... Its really a simple script. ... to ssh into a node and do a 'df -k', ... use Net::SSH qw(ssh issh sshopen2 sshopen3); ... sub TEST { ...
    (comp.lang.perl.misc)
  • Re: net::ssh and functions
    ... and display the contents on my terminal, ... use warnings; ... use strict; ... use Net::SSH qw(ssh issh sshopen2 sshopen3); ...
    (comp.lang.perl.misc)