You want Y=f(X) where f is polynomial, right? Lagrange interpolation will give you algebraic equality, but watch out for numerical problems if you want to use f. Your interpolant will have one less degree than the length of your list. If you are happy with approximate equality using a lower degree, you need a regression routine.
If you look at PDL::Fit::Polynomial, you can do it either way (because the degree of the approximating polynomial is input by the user). PDL also provides a gateway to standard numerical routines written in C.