PerlMRIM is a simple Perl module, distributed through CPAN, which implements a significant subset of the protocol of agent@mail.ru (aka Mail.Ru Instant Messenger, aka MRIM) as a PERL API. The specifications of this protocol were made available by Mail.Ru, and this implementation is based upon them.

You can get the package on its CPAN page. There is a GUI interface to it, implemented in wxPerl.