in reply to Hashes hunt me even when I sleep....

I always number my song titles, so this solution doesn't exactly address your problem, but it's close enough.

This will populate a hash:

# warning: untested my %collection; while(<ALBUMS>) { my ($artist, $album, $song) = split; push @{$collection{$artist}{$album}}, $song; }
And this will retrieve the data back, unsorted:
foreach my $artist (keys %collection) { print "$artist:\n"; foreach my $album (keys %{$collection{$artist}}) { print "\t$album:\n\t\t"; print join("\n\t\t", @{$collection{$artist}{$album}}), "\n"; } }
Hope this helps, Jeff

UPDATE: oops, yes isotope - that's what I meant.

Replies are listed 'Best First'.
RE: Re: Hashes hunt me even when I sleep....
by isotope (Deacon) on Oct 06, 2000 at 00:58 UTC