in reply to Extract hidden values from HTML

It would be more appropriate to use the id attribute to identify individual elements within html.
<table> <tr id="row_1"> <td id="row_1_col_1"> stuff </td> <td id=row_1_col_2"> stuff </td> </tr> <tr id="row_2> ... </table>
HTML::Parser would provide an attributes string which would include the attribute id="row_1_col2" which could in turn be used to build your own hash. As HTML::TableExtract is built on HTML::Parser , the attributes may be available.

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

Replies are listed 'Best First'.
Re^2: Extract hidden values from HTML
by Unforgiven (Hermit) on Dec 14, 2009 at 14:37 UTC

    You might have meant this anyway, being that you're giving a very general example, but just in case Kalyanrajsista doesn't - it'd be better to use something semantic for the ids or classes rather than literally "row_1_col_1".

    I haven't used the modules mentioned, but I'd imagine it's likely you could just count which row you're on anyway, so you could know which row you're on without that information being in the HTML anyway. What you can't know is what it means. Use class names and ids (remember ids have to be unique to the page) like "last_name" or "total_price" or whatever else is appropriate.

      I've a row defined as below and I want to extract hidden value from it.

      <td class="c"><input type="hidden" name="recid5" value="10293424">2009 +/08</td>