Hello:
I am using HTML::FORM to get all the form elements. The URL I go to has Input names as the same name from multiple fields. For example there are 4 date fields called FDATE. When I use the HTML::FORM to view the fields it display FDATE only once.
The question is How do I get all the FDATE fields and How do I update each one with different dates?. Here is my code to get the name and values.
use LWP::UserAgent;
use HTML::Form;
my $ua = LWP::UserAgent->new;
my $response = $ua->get("http://www.hellp.com/test.exe");
my @forms = HTML::Form->parse($response->content,
$response->base);
foreach $form(@forms)
{
@names = $form->param;
foreach $name(@names)
{
@values = $form->param( $name );
foreach $values(@values)
{
print "Name:$name Value of:$values \n";
}
}
#print "$form \n";
}
Thanks for your help in advance.
Edit by castaway - added code tags
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.