using a function with net::ssh

U

usaims

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('(e-mail address removed)', $variable );


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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,743
Latest member
WoodrowMea

Latest Threads

Top