#!/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 = ; $word = chomp( $word ); $mech->get( 'http://www.wordsmith.org/anagram/index.html' ) or die "Unable to access page.\n"; $mech->form_number(2); $mech->field( 'anagram', $word ); $mech->submit_form; wait until $mech->success(); print $mech->content;