in reply to finding highest magnitude - FFT
my $series = [ qw { 123 49 43 90 ...} ]; my $fft = new Math::FFT($series); [download]