in reply to Re^8: Speeding up named capture buffer access
in thread Speeding up named capture buffer access

If you are willing to trade a few globals to obtain speed, then a dispatch table might allow for reasonable maintanence:

my( $hrs, $mins, $secs, $day, $month, $year, ... ); my %res = ( qr[(\d\d):(\d\d):(\d\d)] => sub{($hrs,$mins,$secs) = ($1 +,$2,$3) }, qr[(\d\d)/(\d\d)/(\d\d(?:\d\d)*)] => sub{($day,$month,$year) = ($1 +,$2,$3) }, ..., '' => sub{ die "Unknown date format" }, }; ... $maybeTime =~ $_ and $res{ $_ }->() for keys %res;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)