[root@june2 ~]# perl h1.pl www.b.com
$value is 7.7.7.7
[root@june2 ~]# cat h1.pl
%hash;
open (LOG ,"<","ip.txt");
while (<LOG>){
chomp ($_);
if ($.%2==1){$a = $_};
if ($.%2==0){$b = $_};
$hash{$a} = $b;
};
if ( $#ARGV < 0 ){
print "please input your domain!
";
exit(-1);
}
$key = $ARGV[0];
$value=$hash{$key};
print "$value is $value
";