Net::Jabber::Client (code)

use Net::Jabber qw(Client);

my $jabber = Net::Jabber::Client->new();
$jabber->Connect(
        hostname => 'talk.google.com',
        port => 5222
);

my @result = $jabber->AuthSend(
        username => 'user@gmail.com',
        password => 'pass',
        resource => 'twitter'
);

print "$result[0]\n";