#made this events_array up... but the concept remains It will always be in a particular order, least to greatest in this case. @events_aray = ("1","3","3","4","5","5"); my %days; my @appears; my @date_count; my $c = 0; foreach my $v (@events_aray) { #this foreach will split the values of the array I have populated #it will then produce a hash with keys as a date. #another array will be generated containing each dates of the event. my ($date, $subject, $text) = split(/,/, $events_array); $days{$date} .= "$subject($symbolx)

$text

"; $date_count[$c] = "$date"; #this stores the date of the event, this will be the array I need to figure out how many times each date appears $c++; } #some subroutine to figure out how to retrieve the amount. #The array that I said I needed to generate will be @appears. #this is where I need a little help on. I will continue #looking though and if resolved I will post back asap. $c = 0; foreach my $u (keys %days) { print "date appeared $appears[$c] times"; print "

$days{$u}"; $c++; }