here's one solution, i prefer a hash to an array, it's quicker to index, and you can still treat it as an array with (keys %log).
just as i was finishing this, i realised that probably a better way would be to set $/ (or $INPUT_RECORD_SEPARATOR in the "English" module) to "-----\n"
that way it'd read in the date for the first read, and the entry for the 2nd, but i'd pretty much finished by then
#!/usr/bin/perl -w
use warnings;
use strict;
my $file = '2004';
sub split_log($); #prototype
my %log = &split_log($file);
while (my $key = each(%log)) { print "$key = $log{$key}\n"; }
#--------------------------
sub split_log($) {
my $file = shift or die;
my %hash;
open LOG, $file or die $!;
$/ = undef;
my $log = <LOG>;
close LOG;
$/ = "\n";
my @split = split /\-{5}/, $log;
while (@split) {
my $date = shift @split;
my $entry = shift @split;
last unless $entry;
chomp $date;
chomp $entry;
$date =~ s/^\n//;
$entry =~ s/^\n//;
print "date = $date\n";
print "entry = $entry\n";
$date =~ s|^(\d{4})/(\d{2})/(\d{2}), (\d{2})
\d{2})
\d{2})|$1$2$3$4$5$6|;
$hash{$date} = $entry;
}
%hash;
}