#!/usr/bin/perl # Philip Shuman philip at shuman dot org http://www.shuman.org # cdList.pl v0.2.0 @files = `ls`; foreach $file (@files) { $discid = `grep DISCID $file`; $discid =~ s/DISCID=//; $dgenre = `grep DGENRE $file`; $dgenre =~ s/DGENRE=//; $dtitle = `grep DTITLE $file`; $dtitle =~ s/DTITLE=//; ($artist, $album) = split("/", $dtitle); chomp($discid); chomp($dgenre); chomp($artist); chomp($album); print "$discid|$artist|$album|$dgenre\n"; }