$i=0; $j=0; while () { chomp $_; ($fgid[$i], $fvalue, $flat[$i], $flong[$i]) = split /,/, $_; $fval{$flat[$i]}{$flong[$i]}=$fvalue; $i++; } #### virsfire_199801,-1,39.750000,-179.500000 virsfire_199801,-1,39.750000,-179.000000 virsfire_199801,-1,39.750000,-178.500000 virsfire_199801,-1,39.750000,-178.000000 #### print "testing: $flat[1], $flong[1]\n"; print "testing: $fval{39.750000}{-179.000000}\n"; print "testing: $fval{$flat[1]}{$flong[1]}\n"; #### # ./join.pl testing: 39.750000, -179.000000 testing: testing: -1 [root@localhost newstore]#