in reply to unexpected RE match

elsif (/(\d+)+(\d+):(\d+)/) matches against $_ because you forgot to say elsif ( $time =~ /(\d+)+(\d+):(\d+)/ ), and $_ is probably the whole input line, and

use Data::Dumper; print Dumper( "Thu Jun 22 10:25" =~ /(\d+)+(\d+):(\d+)/ ); __END__ $VAR1 = '1'; $VAR2 = '0'; $VAR3 = '25';

Replies are listed 'Best First'.
Re^2: unexpected RE match
by WoodyWeaver (Monk) on Jul 05, 2017 at 23:05 UTC
    many thanks. we always see what we expect, not what is there.
      Also note that your regex isn't going to match those minus signs. -G
      PerlMonks iz awe-some. I love the vibe.