# this is what should be used instead of the hard-coded value: # my $today = strftime("%m-%d-%Y",localtime()); my $today = '08-14-2013'; my @todays; for ( @orig_data ) { next unless m/^($today )/; push(@todays,$_); } # NOTE! this will reverse the order of Yes and No if they have the # same time. @todays = sort(@todays); for ( @todays ) { print "$_\n"; }