#!/usr/bin/perl -w
use WWW::Mechanize;
use strict;
my $mech = WWW::Mechanize->new();
$mech->get("https://www.google.com/");
#$mech->get("https://www.southwest.com/");
print $mech->uri();
print "\n";
my @theForms = $mech->forms();
print $#theForms."\n"; #How many forms are returned in the array
foreach my $form (@theForms) {
my @inputfields = $form->param;
foreach my $input (@inputfields){
print $input."\n";
}
}
####
https://www.google.com/
0
ie
hl
source
biw
bih
q
btnG
btnI
gbv
####
https://www.southwest.com/
-1