Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Template strings

by trammell (Priest)
on Jul 05, 2005 at 13:41 UTC ( [id://472446]=note: print w/replies, xml ) Need Help??


in reply to Template strings

Let's not forget sprintf():
my $template = 'bar %s foo foo %s bar bar BAAAR!'; my $out = sprintf $template, 'Guybrush', 'Purcell';

Update: This is also a FAQ.

Update 2: This is also the Cookbook recipe of the day on perl.com. What a coincidence!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (None)
    As of 2024-04-25 01:51 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found