binmode STDIN, ":utf8"; while () { if ( 0 != m/\d\d:\d\d, \d\d?\. ...\. 20\d\d/) { print "$&\n"; } }