also..be careful mixing html tags with perl variables inside double quotes. i separate html from variables etc by single quoting all html and join or concatenate to other output. otherwise perl can sometimes misinterpret html tags as greater/smaller comparisons with your perl variables..and closing html tag slashes look like escape chars etc.
the hardest line to type correctly is: stty erase ^H