Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: eval using hash values

by swiftone (Curate)
on Nov 05, 2002 at 15:18 UTC ( #210474=note: print w/replies, xml ) Need Help??


in reply to eval using hash values

It may be a bit of an overkill, but assuming you are trying to have:
$text = 'my $foo has gone completely $bar'; %hash = (foo => 'dog', bar => 'crazy'); $final_text = unknown_method($text); #$final_text is now 'my dog has gone completely crazy'
I think Text::Template will do exactly what you want. If that's not what you want, please clarify.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://210474]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-11-20 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (284 votes). Check out past polls.

    Notices?