$t = Net::Telnet->new(...); $t->open(...); push @array, $t; #### $hash{"$ip.$ip3.$ip4"} = $t #### my $base = (192 << 24) + (168 << 16); foreach my $ip ($base .. $base+65535) { $t = Net::Telnet ... $t->open(... $hash{$ip} = $t; }
## $hash{"$ip.$ip3.$ip4"} = $t ##
## my $base = (192 << 24) + (168 << 16); foreach my $ip ($base .. $base+65535) { $t = Net::Telnet ... $t->open(... $hash{$ip} = $t; }