Thank you for your reply. I played around with it some more and looked at the form information on the page. I realized that there were 2 forms, I amended the code to:
#!/usr/bin/perl use strict; use diagnostics; use warnings; use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new(); print "What word would you like to know the anagrams of?\n"; my $word = <STDIN>; $word = chomp( $word ); $mech->get( 'http://www.wordsmith.org/anagram/index.html' ) or die "Un +able to access page.\n"; $mech->form_number(2); $mech->field( 'anagram', $word ); $mech->submit_form; wait until $mech->success(); print $mech->content;
Now it has no error messages; however, it seems to be printing the original website, rather than the results of my query.
In reply to Re^2: WWW::Mechanize::Firefox question
by Joie
in thread WWW::Mechanize::Firefox question
by Joie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |