needhelp has asked for the wisdom of the Perl Monks concerning the following question:
..That part of the code opens up the SSH session and performs the command "dig +short (on whatever domain is specified)." The "dig" prints out an IP address, that is what I need. I need to a way to set that to a variable, and so far I am having no luck. Any help with this would be much appreciated. Thank you.... John#!/use/bin/perl use strict; print "Domain? "; my $domain = <STDIN>; chop($domain); Use Net::SSH qw(issh); my $user= "<USERNAME>"; my $host= "<HOSTNAME>"; my $cmd="dig +short $domain"; issh("$user\@$host", "$cmd");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Set a variable to remote information
by sauoq (Abbot) on Jul 02, 2003 at 15:41 UTC | |
by needhelp (Initiate) on Jul 02, 2003 at 16:01 UTC | |
by sauoq (Abbot) on Jul 02, 2003 at 16:11 UTC | |
|
Re: Set a variable to remote information
by Zaxo (Archbishop) on Jul 02, 2003 at 15:52 UTC |