perlquestion
redss
Is there a way to use the return value of the function in the replace text of the s/// operator?
<p>
In other words is there a way to effectively do this:
<pre>
s/__AMOUNT__/format_number($amount)/g;
</pre>
instead of this (which requires an extra line and variable):
<pre>
$formatted_amount = format_number($amount);
s/__AMOUNT__/$formatted_amount/g;
</pre>