using a function with net::ssh
- From: "usaims" <usaims@xxxxxxxxx>
- Date: 9 Mar 2007 14:35:42 -0800
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;
}
########################################
.
- Prev by Date: Re: Net-SSH-W32Perl strange behaviour.
- Next by Date: net::ssh and functions
- Previous by thread: FAQ 7.17 How can I access a dynamic variable while a similarly named lexical is in scope?
- Next by thread: net::ssh and functions
- Index(es):
Relevant Pages
|