in reply to Regex speed issue
How about
where$this->{ template } =~ s/$re/$this->replacement( $callback, $key, $1, +$2 )/eg;
I don't know if this is any faster than what you have, but at least it avoids the use of evil variables.sub replacement { my $this = shift; my ( $cb, $key, $first, $second ) = @_; return $cb->( $key, $this->mask_block_params( $first, $second ) ); }
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex speed issue
by mtsachev (Initiate) on Aug 30, 2005 at 15:03 UTC |