Y
Yaroslav
Hi all,
Consider the following trivial example:
$_ =~ s/<matching_expression>/<clause_that_uses_$1>/g;
Is there a way to build such a regular expression, that matches some
string and modifies the match (e.g. $1) before using it in the replace
clause? What if I want to do something with $1 before I use it to
replace something? Is there a way to insert, say, a function of $1
there, rather than $1 itself?
TIA.
~yaroslav
Consider the following trivial example:
$_ =~ s/<matching_expression>/<clause_that_uses_$1>/g;
Is there a way to build such a regular expression, that matches some
string and modifies the match (e.g. $1) before using it in the replace
clause? What if I want to do something with $1 before I use it to
replace something? Is there a way to insert, say, a function of $1
there, rather than $1 itself?
TIA.
~yaroslav