#!/usr/local/bin/perl -w use strict; use Net::Telnet (); #get the contents of the array from mike. my (@files, $t, @hosts, $result,$cpu); $hosts[0]="aster"; $hosts[1]="candytuft"; my $username="user"; my $password="pass"; foreach $cpu (@hosts) { #use the net telnet module here. $t = new Net::Telnet (Timeout => '30', Prompt => '/[%#>] $/', host=>$cpu); print " $cpu \n"; $t->login($username, $password); $t->cmd("cd /usr/openv"); print $t->cmd("usr/bin/ls"); @files = $t->cmd("find . -type f -print | xargs grep \"domain.com\" /dev/null"); print "-------------\n"; print "Results for $cpu\n"; print "-------------\n"; my $loc; foreach $loc (@files) { print "-- $loc\n"; } my $tmp = $t->dump_log(); print "This is the dump_log \n$tmp \n"; print "\n\n"; }