Dru has asked for the wisdom of the Perl Monks concerning the following question:
Thanks,#!/usr/bin/perl -w use strict; use Net::SSH qw(ssh); my @host = qw[ 192.168.15.2 192.168.14.2 192.168.16.2 192.168.17.2 ]; foreach (@host) { run($_); } sub run { my $host = $_[0]; my $user = 'root'; my $host = 'test-1'; my $cmd = '/usr/local/scripts/down.pl'; ssh("$user\@$host", $cmd); if ($something = somevalue){ mail(); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Continue Processing Subrouting Until Successfull
by ides (Deacon) on Jan 08, 2003 at 15:48 UTC | |
by Dru (Hermit) on Jan 08, 2003 at 16:18 UTC | |
by ides (Deacon) on Jan 08, 2003 at 17:59 UTC | |
by osama (Scribe) on Jan 09, 2003 at 22:36 UTC |