Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Substituting method from object

by elusion (Curate)
on Dec 03, 2002 at 01:27 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://217100]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-26 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found