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 | |
by Anonymous Monk on Jul 07, 2017 at 01:42 UTC | |
by Anonymous Monk on Jul 06, 2017 at 22:43 UTC |