in reply to Estimating continuous functions
Lecture 1
and
Lecture 2.
Note that both of these use matrix algebra, in which case Math::Matrix may ride to your rescue.