in reply to finding highest magnitude - FFT

It looks like you are passing the wrong type of data to new. According to the Math::FFT POD, you should pass a reference to an array, not a single scalar as you are doing.