in reply to div in cgi

Other people have given you already the correct answer. But just as a side node, to your really, REALLY want to generate the HTML code from within your script? At least in my experience (12+ years of writing webserver stuff in Perl), splitting code and HTML into different files is much more maintainable. You really should look into using something like Template Toolkit.

"For me, programming in Perl is like my cooking. The result may not always taste nice, but it's quick, painless and it get's food on the table."