# any single quotes in the filename by closing the quote ('),
# putting an escaped quote (\'), and then reopening the quote (').
for ($fn, $title, $artist, $album, $date) {
- s/'/'\\''/;
+ s/'/'\\''/g;
}
$outfile = sprintf("$artist ($album) \%02s $title.mp3", $track);