If you give Math::Polynomial->interpolate 7 data points, it can generate a 6th order polynomial that passes through those points, you can then evaluate that polynomial at other points.

If that's not what you want, perhaps you want to use Algorithm::CurveFit or PDL::Fit::Polynomial

If that's not what you want, perhaps you want to use Algorithm::CurveFit or PDL::Fit::Polynomial