use JSON::XS; use WWW::Mechanize; use HTTP::Cookies; use LWP::Simple; use strict; use warnings; my $login = "https://steamcommunity.com/login/home/?goto=market%2F"; my $username = "USR"; my $password = "PASS"; my $mech = WWW::Mechanize->new(); $mech->cookie_jar(HTTP::Cookies->new()); $mech->get($login); $mech->form_name('loginForm'); $mech->field(login => $username); $mech->field(passwd => $password); $mech->click();