my @tops; open FILE, " ) { if ( m/^top \- (\d{2}:\d{2}:\d{2})/ ) { push @tops, $1; } } close FILE;