http://qs1969.pair.com?node_id=397956

awohld has asked for the wisdom of the Perl Monks concerning the following question:

There's a site: http://www.speedtrap.org/speedtraps/ste.asp?state=AK&city=all that I want to get the speed trap info off of, it is in the form of an HTML table:

<table border="1" width="100%" cellpadding="1" cellspacing="1"><br> <tr> <td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2 +">Jurisdiction (city, county, etc.):</font></td> <td width="66%" bgcolor="#FFFFFF"><font size="5" face="Arial +"><b><font size="3">Anchorage, Alaska</font></b></font></td> </tr> <tr> <td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2 +">Speed Trap Location:</font></td> <td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="- +1">Minnesota Parkway</font></td> </tr> <tr> <td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2 +">Nearest Reference Point:</font></td> <td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="- +1">12th Avenue</font></td> </tr> <tr> <td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2 +">GPS Coordinates:</font></td> <td width="66%" bgcolor="#FFFFFF"> n/a </td> </tr> <tr> <td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2 +">Time of Day:</font></td> <td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="- +1">Any time of day</font></td> </tr> <tr> <td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2 +">Level of Enforcement:</font></td> <td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="- +1">Some</font></td> </tr> <tr> <td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2 +">Type of Enforcement:</font></td> <td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="- +1">Radar</font></td> </tr> <tr> <td width="34%" bgcolor="#CCFFFF"><font face="Arial" size="2 +">Date:</font></td> <td width="66%" bgcolor="#FFFFFF"><font face="Arial" size="- +1">4/2004</font></td> </tr> <tr bgcolor="#FFFFFF"> <td colspan="2">Before entering downtown on Minnesota, an of +ficer will be waiting on 11th ave. when you come around the corner in +to a 25mph speedlimit from a 45mph.This is the place I received my on +ly ticket in five years and it was for 21mph over. </td> </tr> <tr> <td colspan="2" bgcolor="#E6ECF0"><a href="comments.asp?stat +e=AK&city=all&st=20945"><font color="#2F2CFF">Click here to view the +1 comment about this speed trap.</font></a></td> </tr> <tr> <td colspan="2" bgcolor="#E6ECF0"> <a href="comment.asp?state=AK&city=all&st=20945"><font + color="#2F2CFF">Agree/Disagree? Add your comment.</font></a> </td> </tr> </table>

There are many records on many different pages that I want to archive. I want automate a script to put all of the records on a page into a comma delimited text file.

I don't know where to start. Can someone give me some direction on this?

Thanks
Adam

20041010 Janitored by Corion: Put Table HTML into CODE tags

janitored by ybiC: Balanced <readmore> tags around codeblock