1) you will
definitelypossibly need the cookies. You can either manually add a cookie header with the value listed, or you can use a cookie jar.
2) Try backing out from using the ua->post method to creating a post from HTTP::Request::Common so you can interact with and examine it.
3) note that the outgoing request was text/plain. No URL encoding was done.
Turns out you just need it in the format it wants, and will accept text/plain or x/www-form-encoded content.
#!/usr/bin/perl
use warnings;
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
use Data::Dumper;
my %fields = (
"LeagueID" => "9\r\n",
"GameDate" => "3-2-2010\r\n",
"Season" => "2009-2010\r\n",
"Refresh" => "false\r\n",
"LastUpdateTime" => "01-01-1900\r\n",
"type" => "Matchups\r\n",
"RefreshStartTime" => "11-2-2010-1268372427240\r\n",
"Week" => "\r\n",
"conferenceID" => "",
);
my $robot = LWP::UserAgent->new;
use HTTP::Request::Common;
my $url
= 'http://scores.covers.com/ajax/SportsDirect.Controls.LiveScoresC
+ontrols.Scoreboard,SportsDirect.Controls.LiveScoresControls.ashx?_met
+hod=UpdateScoreboard&_session=no';
my $post = POST $url , \%fields;
# $post would be url-encoded
# 'content-type' => 'application/x-www-form-urlencoded',
# print Dumper $post;
my $content = qq{LeagueID=9\r\nGameDate=3-2-2010\r\nSeason=2009-2010\r
+\nRefresh=true\r\nLastUpdateTime=01-01-1900\r\ntype=Matchups\r\nRefre
+shStartTime=12-2-2010-1268408433293\r\nWeek=\r\nconferenceID=};
# your target url appears to accept either of these
my $post2 = POST $url, Content => $content;
#my $post2 = POST $url, 'content-type' => 'text/plain', Content => $co
+ntent;
print Dumper $post2;
print Dumper $robot->request( $post2);
at least I assume this is the sort of output you were expecting:
'_content' => '{\'LeagueID\':9,\'League\':\'NBA\',\'GameDate\':\'3-2-
+2010\',\'Season\':\'2009-2010\',\'Week\':\'\',\'GameResponseList\':[]
+,\'LastUpdateTime\':\'01-01-1900\',\'RefreshStartTime\':\'12-2-2010-1
+268408433293\',\'Refresh\':true,\'PageType\':\'Matchups\',\'ScoreBoar
+dHTML\':\'<div id="Scoreboard_9"><table class="scoreboard" border="0"
+>\\r\\n <tr>\\r\\n <td class="scoreboard-left"><div
+ id="Game_9_781166" class="game-box"><span class="activetab" id="In_G
+ame_Status_9_781166">Final</span><div class="soright" id="Title_9_781
+166">Boston at Detroit</div><span class="pick_button"><a href="http:/
+/contests.covers.com/sportscontests/makepicks.aspx?sportID=9&EventID=
+781166"><img src="http://images.covers.com/scores/general/pick.gif" a
+lign="absmiddle" alt="contest pick" border="0"