use WWW::Mechanize; use Test::More qw(no_plan); my $bot = WWW::Mechanize->new(); $bot->get('http://localhost/path/to/cgi_script.cgi'); $bot->tick('chklstCC:0','Visa'); $bot->submit; is( $bot->content(), 'Visa', "Got expected content" );