##text Scrolled## $textsc = $txtget->Scrolled ('Text', -scrollbars => 'oe', -width=> 33, -height => 32)->pack; ##Button## my $botaotest = $framebtest -> Button(-text => 'Test Ips!',-command =>\&gotest) -> pack(-side => 'left', -expand => 1,-ipadx => 145); sub gotest{ if ( @$ref){ $textsc->insert('end',"Lets see Wich Ips are ON...\n"); @ipsproxy = map("$_->{ip}", @$ref); $p = Net::Ping->new("icmp"); $p->bind('187.78.223.205 '); @validos = (''); foreach $aaa (@ipsproxy) { print "$aaa is "; unless ($p->ping($aaa, 3)){ print "Host OFF\n"; }else{ push @validos, "$aaa"; printf "ALIVE!!!\n"; sleep(1); } } $p->close(); @nwvalidos = join("\n",@validos); $textsc->insert('end',"Ips Alive:@nwvalidos"); }else{ $textsc->insert('end',"#########ERROR#########\n...I Need Ips to test, dude!!!"); } }