Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Substituting method from object

by elusion (Curate)
on Dec 03, 2002 at 01:27 UTC ( #217100=note: print w/replies, xml ) Need Help??


in reply to Substituting method from object

In a substitution, the replace value isn't evaluated, it's treated as a string. If you want it to be evaluated, you need to use the /e modifier.

$error_string =~ s/error/$user->get_error_string/e;

This is also how you would replace something with the value returned by a function or any other code.

elusion : http://matt.diephouse.com

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2019-07-20 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?






    Results (5 votes). Check out past polls.

    Notices?