First read this faq. In a nutshell, HTML parsing, especially something like analyzing arbitrary tables, is pretty difficult. There are modules designed especially for this, though, so check out HTML::Parser and HTML::TokeParser. Also see answers to a similar question here.
cellpadding, cellPadDing, ceLLpaddinG are all the same. I actually saw a table-extract module which may be of use to you.
Personally, I would not advise doing any HTML parsing yourself. Use modules -- their authors know their stuff!