Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: How do I do it without a temporary variable?

by FamousLongAgo (Friar)
on Dec 27, 2002 at 20:47 UTC ( [id://222619]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I do it without a temporary variable?
in thread How do I do it without a temporary variable?

Just to be really perverse ( and firmly in the "My eyes! my eyes! Aaaugh!" department), is there a way to do this using indirect OO syntax? I tried a couple of approaches, the closest I can get is:
print data { $obj2->object };

Replies are listed 'Best First'.
Re: Re: Re: How do I do it without a temporary variable?
by sauoq (Abbot) on Dec 27, 2002 at 21:23 UTC
    print data { $obj2->object };

    That doesn't even work. The print will break it. print STDOUT data { $ob2->object }; would though.

    I'm not sure how or even whether it is possible to get the ob3->name portion to be used as the method in indirect syntax though. I played with it a bit and the closest I could come to it required an eval. :-) I couldn't get it to work with symbolic refs either. Somehow, I think that's a good thing...

    -sauoq
    "My two cents aren't worth a dime.";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-23 15:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found