Why not just this?

use LWP;
use strict;

sub get_info {
   my ($user, $pass) = @_;
   my $ua = LWP::UserAgent->new;
   $ua->cookie_jar({});  # automatically handle cookies
   my $res = $ua->post(
     'http://ambar.coldfirestudios.com/game/login',
     [Username => $user, Password => $pass ]
   );
   $res = $ua->get('http://ambar.coldfirestudios.com/game/mainmenu');
   return $res->content;
}

You'll need a recent version of LWP tho, that'll have ->get and ->post 
methods.  But recent versions are always good.

--
Sean M. Burke    http://www.spinn.net/~sburke/

Reply via email to