#!/usr/bin/perl
#!/usr/bin/perl
%data = ('google'=>'google.com', 'runoob'=>'runoob.com', 'taobao'=>'taobao.com');
@names = keys %data;#该函数返回所有哈希的所有key的数组
#注意是数组
print "$names[0]\n";
print "$names[1]\n";
print "$names[2]\n";
%data2 = ('google'=>'google.com', 'runoob'=>'runoob.com', 'taobao'=>'taobao.com');
@urls = values %data2;#该函数返回所有哈希的所有value的数组
#注意是数组
print "$urls[0]\n";
print "$urls[1]\n";
print "$urls[2]\n";