in reply to capture groups are not working -- why??
Now that, after following AnomalousMonk's advice, your code works, may I suggest to use a slightly shorter way of achieving the same thing:
my ($YY,$MM,$DD,$HH,$MI,$SS) = $line1 =~ /^Current\stime\s=>\s(\d\d\d\d)(\d\d)(\d\d)\S(\d\d)(\d\d)( +\d\d)/sx ; my ($numUsers) = $line2 =~ /^\((\d+).row/sx;
Clearly, this is personal preference, so please ignore if you find it too condensed.
|
|---|