This is my code...
use strict; use warnings; use Geo::IPfree; my @a1 = qw(192.168.32.121 200.293.12.12); my @code = (); my @name = (); my $num = scalar(@a1); print "@a1 \n"; print "$a1[1] \n"; print "$num \n"; #value is 2 my $geo = Geo::IPfree->new; for (my $i=0; $i<$num; $i++){ ($code[$i], $name[$i]) = $geo->LookUp($a1[$i]); print ("$code[$i] - $name[$i] \n"); print "@code \n"; } exit; # This code results in the following output: 192.168.32.121 200.293.12.12 200.293.12.12 2 ZZ - Reserved for private IP addresses ZZ BR - Brazil ZZ BR
In reply to Re: For Loop with Geo::IPFree
by cztmonk
in thread For Loop with Geo::IPFree
by maheshkumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |