Perl-Sensitive Sunglasses | |
PerlMonks |
Parsing Forms with selectionsby Helter (Chaplain) |
on Sep 10, 2002 at 20:52 UTC ( [id://196812]=perlquestion: print w/replies, xml ) | Need Help?? |
Helter has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to parse some HTML I've downloaded from a site I have no control over (so no "just change the site" answers :) and am having trouble parsing the form I'm pasting below. I am also pasting a test script that has the basic flow of my code. I must be missing something, which is entirely possible considering my newbie-ness to web/HTML/HTTP processing, so be gentle if it turns out I'm doing something really stupid :) A few notes may be in order, I have changed the html to protect the innocent. In the actual content of the page there are 2 forms, which is why I parse multiple forms in my code. If it works doing it one at a time, I'm all for code that works.
The html I'm trying to parse I'm a debugger kind of guy, here is the output when I examine the @requestForms object. You may note the undef items, I'm assuming they are supposed to have OPTIONX in them? I'm not sure how the default option is specified. I'm not sure what functions you use to select a selection. (the field function does not seem to do what I want) My copy of Perl & LWP should be here any day now.....maybe that will solve everything :) Thanks!
Back to
Seekers of Perl Wisdom
|
|