in reply to regex question

There's a couple ways you could do it. Here's one, but there can't be a '.' or a '|' in the file name.
$string=~ /\s*([^.|]+)\.mp3/; print "$1\n";
Hope this helps,
Rich

update
Use:

$string=~/\s*([^|]+)\.mp3/;
The period wasn't needed.