This may sound heretical, but I suggest that Perl may be the wrong tool for the specific job you want doing. Great for collecting the data to feed to a better tool and great for interpreting and/or displaying that tool's result, but not especially good for doing the signal processing. You can write signal processing code in Perl, or any other Turing complete language, but sometimes it's better not to. I learned this lesson through experience ...
As others have said, you're asking a moderately hard question in DSP and, IMO, you should be using tools which have been designed specifically to perform efficient and robust DSP. There are a good number available, some which cost real money, some which are free (as in beer and/or speech) and some which are in between.
You don't reveal the nature of the platform you want to run this on, your budget (time and money, remember) or your views on free / non-free software so it's difficult to give specific advice and targeted use of Google is highly recommended. That said, consider Matlab/Octave for turn-key solutions. I've learned a lot from Numerical Recipes and have used their code in some of my projects.