Just thinking logically, how would you expect the Perl interpreter to differentiate between quotes you wish to be included in the string and the string boundaries? Even if that did make sense, your code fragment doesn't even remain consistent. In line 38, you finish off the HTML tag and the string. Would you expect a dumb machine like a computer to be able to guess the meaning? Often, you don't even finish off your lines with semicolons- that's the first fatal mistake you need to clean up. If you think like the interpreter (line-by-line analysis), the problem will jump out at you. But, as with everything- practice, practice, practice...
side note- it's much cleaner to implement tables using CGI.pm.
Keep in mind that q and ' will interpret the string literally and qq and " will interpolate any vars in that string.