#!/usr/bin/perl use CGI; use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use Crypt::SSLeay; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $url = "https://plex.tv/users/sign_in"; $mech->agent('User-Agent=Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.7'); $mech->get($url); print $mech->status; $result = $mech->submit_form( form_id => new_user, #name of the form #instead of form name you can specify #form_number => 1 fields => { user_login => 'test', # name of the input field and value user_password => 'test', } ,button => 'commit' #name of the submit button ); my $app_content = $mech->content(); print "$app_content\n";