in reply to Review this HTML-generating code

This is a great piece of code, but you are re-inventing the wheel a little. HTML::Template can put some complicated data structures into a HTML document.

In your example you could just pass HTML::Template a LOH and it would interate over them, spitting out a navigation bar just the way you want.

HTML::Template can also do if/then/else embedded in the HTML.

This is usually easier for maintenance, since reading HTML that is in a Perl program is quite difficult.

____________________
Jeremy
I didn't believe in evil until I dated it.