Sounds to me like your first problem isn't the fact that Perl is slow. Your first problem is that you have no idea whether or not your approach for processing all this data is efficient or not!
You're describing a pretty classic Graph Theory problem - taking a large set of points in space (3-dimensional space in this case), and finding the subset of points that are within a certain distance of eachother. Go find a good book on graph theory (Introduction to Algorithms is a great one), and make sure your approach is sound.
Only then should you start worrying about whether or not perl is fast enough or not.