.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl -w

$song_file = '/path/to/songfile';

open(SL, '>>$songfile') or die "song file: $!";
use Xmms::Remote;
$remote = Xmms::Remote->new();

unless($remote->is_running) {
        die "No XMMS.";
}

my $track = $remote->get_playlist_pos;
print SL $remote->get_playlist_title($track), "\n";