
twistedphrame
Novice
Mar 2, 2010, 4:37 PM
Post #4 of 7
(8370 views)
|
Re: [shawnhcorey] Parsing values and names in HTML Dropdown
[In reply to]
|
Can't Post
|
|
Thanks for the suggestion. I've figured out how to get the string for each element in the Term dropdown but I'm not sure how to get the value of each, when I try the ->content_list I just get memory locations I'm not sure how to use.
my $tree = HTML::TreeBuilder->new; $tree->parse($content); $head = $tree->look_down('_tag', 'td', sub { $_[0]->as_text =~ m{Term} }) ; $term1 = $head->as_text; $term1 =~ s/(Term)(.*)/$2/; this will give me a string that looks like:
10/SP - Spring 201010/SU - All Summer 201010/SA - Summer A 201010/SB - Summer B 201010/SC - Summer C 201010/SD - Summer D 201010/SE - Summer E 201010/FA - Fall 201011/SP - Spring 2011 I can write something to extract the names of each easy enough but I want to hash these names to the actual values and I'm not sure as how to do this.
(This post was edited by twistedphrame on Mar 2, 2010, 5:35 PM)
|