in reply to Perl/Cgi : Any packages for Trees?

You have to appreciate that Perl/CGI is running on the web server whereas JavaScript runs inside the web browser, which means that JS can do these "instant" effects while Perl always needs to reload the page.

In any case, Perl/CGI uses a combination of HTML/CSS/JS to render its output in a web browser, and there are a few modules on CPAN that help you in producing this HTML/CSS/JS code.

I have not tested any of them, though.