#!/usr/bin/perl use strict; use warnings; # the module we're looking for my $module_name = 'WWW::Mechanize'; # create a new browser use WWW::Mechanize::Firefox; my $browser = WWW::Mechanize::Firefox->new( launch => 'C:/Program Files/Mozilla Firefox/firefox.exe',tab=>'current' ); # tell it to get the main page $browser->get("http://search.cpan.org/"); # submit the query form $browser->submit_form(with_fields=>{query=>$module_name});