in reply to perl module or code for calculating the shortest distance between a line and a point (vector linear algebra)
Have a look onto Math::Geometry::Planar, there's DistanceToLine function, which seems is what you need.