(Though this code is untested)while ($line = <ALBUMS>) { ($artist, $album, $song, $location) = split('\|', $line); $songlist{$artist}{$album} .= $song . "+"; } foreach $artist (sort keys %songlist) { print "Artist: $artist\n"; foreach $album (sort keys %{$songlist{$artist}}) { print " Album: $album\n"; print " Songs:\n"; $i = 0; @songs = split('\+', $songlist{$artist}{album}); foreach $song (@songs) { $i++; print " $i. $song\n"; } } }
In reply to Re: Hashes hunt me even when I sleep....
by kilinrax
in thread Hashes hunt me even when I sleep....
by bman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |