home Mail List
Info
Info
Meetings
Goals
Upcoming
Projects
FAQ
Security
Links

[Date Prev][Date Next] [Chronological] [Thread] [Top]

[NMLUG] Perl Help. Please.


  • Subject: [NMLUG] Perl Help. Please.
  • From: jude at photon.health.unm.edu (Jude Gabaldon)
  • Date: Sun Feb 8 12:31:48 2004

Group,
  I need help with the following perl problem.  I am using perl to parse 
a web page and collect data the problem being that the matched text and 
the potential variable on different lines (example below) 

                    </td>
                  </tr>
                  <tr>
                    <td></td>
                    <td>
                      Car Color
                    </td>
                    <td colspan="2">
                      Blue
                    </td>
                  </tr>
                  <tr>
                    <td></td>
                    <td>
                      Body Type
                    </td>
                    <td colspan="2">
                      Two door
                    </td>
                  </tr>

                <tr>
                  <td colspan="4">

where Car Color is the matched text and Blue should be the stored 
variable and where Body Type is the matched text and Two door is the 
stored variable.  

Any help would be greatly appreciated.  I guess I could remove the new 
line characters and split the page up with new lines after </tr> but I 
didn't know if there was a better way.  Another way might be to call lynx 
and parse the page as it appears to a web browser.  Any suggestions?

Jude




Please send sugestions and comments to webmaster@nmlug.org.
Valid XHTML 1.1! Valid CSS! Powered by Debian Powered by Apache