Tree-Utils is a project mainly written in Perl, it's free.
Perl module for working with data structures