in reply to Re: WWW::Mechanize form field types
in thread WWW::Mechanize form field types

Ah yes, that is exactly what I was looking for =D I guess I'll reply to this if there is any more trouble. Thanks.


EDIT: It is outputting the same thing =(

Am I doing something wrong?

Here is my code relevant to the issue:
use strict; use WWW::Mechanize; use HTML::Form; use LWP::UserAgent; my $url = "a valid url to an .aspx form here"; my $mech = WWW::Mechanize->new(autocheck => 1); $mech->get( $url ) or die("Could not connect to $url"); my $ua = LWP::UserAgent->new; my $response = $ua->get($url); my @forms = HTML::Form->parse($response); foreach my $page (1..15) { foreach my $form (@forms) { my @fields = ""; @fields = $form->inputs; foreach my $hurr (0..$#fields) { print "$fields[$hurr]\t $page / 15\n"; } } }

Replies are listed 'Best First'.
Re^3: WWW::Mechanize form field types
by Gangabass (Vicar) on Jun 30, 2008 at 08:57 UTC

    As i see you don't read docs :-(

    foreach my $form (@forms) { my @fields = $form->inputs; foreach my $input (@fields) { print $input->type() . "\t $page / 15\n"; } }
      There is a difference between reading and comprehending ;)

      I don't have time right now (and might not for a week) to further look into the problem, but thanks for your help (if what you provided helps).

      It works =D
      Thanks for helping out.