in reply to Using regex to match date and time

You probably haven't turned warnings on, as perl would've told you "Applying pattern match (m//) to @array will act on scalar(@array) at foo.pl line 17".

Your regex looks fine for what you want to do, but your while should be more like that:
while (<DATA>) { chomp; next unless /^(.*)(\d+:\d+:\d+)(.*?)$/; # if you're here, there was a match # do what you want with $1, $2 and $3 ... }