redss has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way to use the return value of the function in the replace text of the s/// operator?

In other words is there a way to effectively do this:

instead of this (which requires an extra line and variable):
$formatted_amount = format_number($amount);