- or download this
s/$regex/transform(%-)/ge
sub transform {
my %matches = @_;
...
}
- or download this
s/($regex)/transform($1)/ge
sub transform {
local $_ = shift;
...
elsif (/^($http)/) { return transform_http($1) }
...
}
- or download this
while (1) {
if (/\G($named)/gc) { print transform_named($1) }
elsif (/\G($http)/gc) { print transform_http($1) }
...
elsif (/\G(.)/gcs) { print $1 }
else { last }
}