First thing i ever wrote(not really) in perl was an irssi/xmms script. I was using xchat for a while and had an xmms script that i wanted to use when i switched to irssi, turns out it doesn't 'just work'
Here is the orsiginal xchat script ...
http://sentience.0ca...B/xmms-share.pl ... Its pretty long so i wont cut and paste it here

Here is what i ended up with.
[code=auto:0]
# Some info on how to use the script ...
#
# /XMNEXT, /XN : advance to the next track on the playlist
#
# /XMPREV, /XP : go back on track on the playlist
#
# /XMRH : Refresh the playlist variable
#
# /XMPL [
] : start playing at the current track or start playing
# track # this can also be used to restart the
# track you are on(i.e. - /xmpl will stop the track, and
# play the track if its allready playing
#
# /XMST : Stops playing the current track
#
# /XMPS : Pauses playing of the current track
#
# /XMSEARCH, /XS : Searches @playlist for a string and outputs anything
# containg that string with its position in the
# playlist. Very very useful.
#
# I DID NOT WRITE THIS CODE. I MERELY PORTED *SOME* OF IT TO IRSSI SO IT
# WOULD WORK. I DONT KNOW PERL AT ALL SO I COULDN'T PORT ALL OF IT. THE
# AUTHOR OF THIS CODE AND THE ORIGINAL XCHAT SCRIPT CAN BE FOUND HERE,
# http://www.akk.org/~zorg/ GIVE CREDIT WHERE CREDIT IS DUE.
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '0.01';
%IRSSI = (
authors => 'BoBB, [JuPiLeR]',
contact => 'snoogans@qwest.net, geert@irssi.org',
name => 'irssi-xmms-share',
description => 'This was an xchat script that i just loved written by Zirias and when
i stopped using xchat i decided to try and port it over. I only have some of the basic stu
ff done that was easy as i dont know perl ... yet
Full credit should go to Zirias as i
hardly did anything. I will try and get contact info for him ASAP.',
license => 'GPL (whichever is current ATM)',
);
use Xmms::Remote ();
use POSIX;
Irssi::print("Loading ...");
Irssi::command_bind('xmnext', 'xmms_next');
Irssi::command_bind('xn', 'xmms_next');
Irssi::command_bind('xmprev', 'xmms_previous');
Irssi::command_bind('xp', 'xmms_previous');
Irssi::command_bind('xmrh', 'xmms_rehash');
Irssi::command_bind('xmpl', 'xmms_play');
Irssi::command_bind('xmst', 'xmms_stop');
Irssi::command_bind('xmps', 'xmms_pause');
Irssi::command_bind('xmsearch', 'xmms_search');
Irssi::command_bind('xs', 'xmms_search');
Irssi::command_bind('xmms', 'xmms_handler');
my @playlist = qw//;
my $length = 0;
my $xmms_remote = Xmms::Remote->new();
my $pl_pos = $xmms_remote->get_playlist_pos;
sub xmms_handler {
my ($data, $server, $channel) = @_;
my $awin = Irssi::active_win();
if ($xmms_remote->is_playing) {
my $title = $xmms_remote->get_playlist_title;
$awin->command("me is listening to ={\c_\cC12 $title \c_\cO}=");
}
return 1;
}
sub getplaylist {
$length = $xmms_remote->get_playlist_length;
for (my $i;$i<$length;$i++) {
my $title = $xmms_remote->get_playlist_title($i);
$title =~ s/(_[^_]*_[^_]*_)|( - )/ <> /;
@playlist = (@playlist,"\cB".($i+1).".\cB ".$title);
}
}
sub xmms_play {
my $num = shift;
if (($num=~/^[0-9]+$/)&&($num>0)&&($num<=$length)) {
$xmms_remote->stop;
$xmms_remote->set_playlist_pos($num-1);
}
$xmms_remote->play;
return 1;
}
sub xmms_search {
my $pattern = shift;
if ($pattern !~ /^$/) {
$pattern =~ s/([\&;\`'\\|"~.<>^\(\)\[\]\{\}\$\n\r])/\$1/g;
$pattern =~ s/\*/.*/g;
$pattern =~ s/\?/./g;
my @result = grep /$pattern/i, @playlist;
my $num = @result;
Irssi::print("\c_$num Results:\c_");
foreach(@result) {
Irssi::print($_);
}
} else {
Irssi::print("\cBUSAGE: /XMSEARCH \cB");
}
return 1;
}
sub xmms_stop {
$xmms_remote->stop;
return 1;
}
sub xmms_pause {
$xmms_remote->pause;
return 1;
}
sub xmms_next {
if ($xmms_remote->is_playing) {
$xmms_remote->playlist_next;
}
return 1;
}
sub xmms_previous {
if ($xmms_remote->is_playing) {
$xmms_remote->playlist_prev;
}
return 1;
}
sub xmms_rehash {
@playlist=qw//;
getplaylist;
Irssi::print("\cB\cC4xmms-share\cO: Playlist re-read.");
return 1;
}
getplaylist;
1;
[code=auto:0]
If anyone actually takes the time to look you'll see i lost quite a bit of functionality due my not knowing a damn thing about perl. Infact i still dont know that much. I should finish porting this thing over and learn me some perl
Now that i think about it ive never shown anyone this or anything. So if i did something incredibly dumb or something please let me know