use strict; use WWW::Mechanize; use HTTP::Cookies; my $mech = WWW::Mechanize->new( agent =>"Mozilla/5.0 (X11; U; Linux i68+6; en-US; rv:1.7) Gecko/20040918 Firefox/0.9.3 "); my $i = 0; my $usr = "username"; my $pw = "password"; $mech->get("http://www.http://www.soundclick.com/mysoundclick"); $mech->cookie_jar( HTTP::Cookies->new() ); if( $mech->content() =~ /CFForm_1/ ){ $mech->input_name("email"); $mech->input_name("password"); $mech->field( email => $usr ); $mech->field( password => $pw ); $mech->click(); if ($mech->success() ) { if ( $mech->content() =~ /My personal member profile/ ) { print "User $usr logged in successfully!\n" ; } else { print " User $usr was unable to log in successfully!\n"; } } }