Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Module object seen as empty variable?

by Hofmator (Curate)
on Jun 13, 2002 at 15:56 UTC ( [id://174246]=note: print w/replies, xml ) Need Help??


in reply to Module object seen as empty variable?

Quoting from perlobj under 'Method Invocation':

For C++ fans, there's also a syntax using -> notation that
does exactly the same thing.  The parentheses are required
if there are any arguments.
 
$fred = Critter->find("Fred");
$fred->display('Height', 'Weight');

The indirect object syntax should also work without parens:

copy $copy_file "/ref/webmail","/www/$domain";

But as TheDamian - and many other people - tell us, this brings more pain than joy, so I'd stick with the extra parentheses.

-- Hofmator

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-28 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found