#!/usr/bin/perl -w use Net::YMSG; use strict; my $yahoo = Net::YMSG->new( pre_login_url => 'http://edit.my.yahoo.co.in/config/', hostname => 'cs.yahoo.co.in', ); $yahoo->id('someuser'); $yahoo->password('password'); $yahoo->login or die "Can't login Yahoo!Messenger"; $yahoo->send('recipient_yahoo_id', 'hi there!'); #### sub get_connection { my $self = shift; return $self->handle if $self->handle; my $server = IO::Socket::INET->new( PeerAddr => $self->{hostname}, PeerPort => $self->get_port, Proto => 'tcp', Timeout => 30, ) or die $!; $server->autoflush(1); return $self->handle($server); }