#!/usr/bin/perl -slw
use strict;
use warnings;
####
opendir DH, "Y://perlscripts2/software/perl2/music" or die $!; # open current directory
while($_ = readdir(DH)){
# don't evaluate special dirs '.' & '..'
next if $_ eq "." or $_ eq "..";
####
if ($_ =~ /\.txt/){
chomp $_;
my ($artist, $song_title) = split '-', $_, 3;
$length{$artist}{$artist} = $artist;
$length{$artist}{$song_title} = $song_title;
print "$_"; # print this file/directory's name
}
####
#! perl -slw
use strict;
use Data::Dumper;
$Data::Dumper::Sortkeys = 1;
my ($id,$songs_ref,$artists_ref,$albums_ref,%songs,%artists,%albums);
opendir DH, "D:/music/Alice In Chains/2001 - Greatest Hits"
or die $!; # open current directory
while($_ = readdir(DH)){
# don't evaluate special dirs '.' & '..'
next if $_ eq "." or $_ eq "..";
# music files in this directory are *.flac files with the
# naming style: