in reply to Re^2: Reading IP from a file and SNMP
in thread Reading IP from a file and SNMP
my @ip_array = (); if(open(F_IP,"<$filename")) { my %ip_hash = (); foreach my $ip (<F_IP>) { chomp($ip); #No duplicates! $ip_hash{$ip} = 1; } close(F_IP); @ip_array = keys(%ip_hash); } else { die "AHHHHH! Error Error go away!!"; } #Just keep doing your thing man...
|
|---|