Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: can substitution operator replace text with value returned from function?

by Paladin (Vicar)
on Jun 11, 2018 at 16:56 UTC ( #1216410=note: print w/replies, xml ) Need Help??


in reply to can substitution operator replace text with value returned from function?

You can use the  /e modifier to  s/// to execute the RHS and use the return value as the substitution value.
s/__AMOUNT__/format_number($amount)/eg;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1216410]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2019-10-22 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?