in reply to Regex speed issue

How about

$this->{ template } =~ s/$re/$this->replacement( $callback, $key, $1, +$2 )/eg;
where
sub replacement { my $this = shift; my ( $cb, $key, $first, $second ) = @_; return $cb->( $key, $this->mask_block_params( $first, $second ) ); }
I don't know if this is any faster than what you have, but at least it avoids the use of evil variables.

the lowliest monk

Replies are listed 'Best First'.
Re^2: Regex speed issue
by mtsachev (Initiate) on Aug 30, 2005 at 15:03 UTC
    This executes in approximately the same time.