in reply to Measure distance between balusters

That's great ... using Perl for carpentry work. Good work! And I hope you didn't get any sawdust in your keyboard.

This reminds me of a similar DIY project of my own where I had to calculate the number of balusters needed for a (horizontal) handrail I was building. Of course I wanted the spacing between the balusters to be the same throughout, and I worked it through with algebra. It was harder than I thought it would be though.