http://qs1969.pair.com?node_id=505135


in reply to two-dimensional coordinate transformation

Each of them would be a map, except you want it to take them two-by-two. Scale is the easiest, since you don't have to worry about that:
sub scale { my ($coords, $factor} map { $_ * $factor } @$coords }
But a more properly-formed structure would be
$a_coords = [ [0,0], [0,10], [10,10], [10,0] ]; # a square
which would be amenable to mapping for all transformations. I think this is a do-it-yourself project, but wouldn't be too surprised to be surprised. :-) Check out Math::Polygon for something in the right ballpark.

Caution: Contents may have been coded under pressure.