in reply to capture groups are not working -- why??
Test your matches (esp. if you're unsure about the data) so you can respond if it failsmy ($YY,$MM,$DD,$HH,$MI,$SS) ; $_ = $line1; /^Current time =>\s(\d\d\d\d)(\d\d)(\d\d)\S(\d\d)(\d\d)(\d\d)/sx ;
if ($line1 =~ /^Current time =>\s(\d\d\d\d)(\d\d)(\d\d)\S(\d\d)(\d\d)( +\d\d)/sx ) { # assign your captures ... } else { # warn about failing to match warn("No Match: $line1\n"); }
a
|
---|