in reply to Template strings
my $template = 'bar %s foo foo %s bar bar BAAAR!'; my $out = sprintf $template, 'Guybrush', 'Purcell'; [download]
Update: This is also a FAQ.
Update 2: This is also the Cookbook recipe of the day on perl.com. What a coincidence!