Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: I don't use printf enough

by sauoq (Abbot)
on Oct 25, 2003 at 08:14 UTC ( #302041=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: I don't use printf enough
in thread I don't use printf enough

I'm not sure I understand your comments about @{[ $o->m() ]} putting things in the "wrong" context and ${\ $o->m() } putting things in the "right" context. The method is called in list context in both cases, right? What am I missing?

I thought, that if you needed scalar context, you had to use scalar(). Perhaps ~~ if you are golfing and can get away with it. (I.e. your method isn't returning a reference or a floating point number.)

Heh . . . ${\~~$o->m} . . . Ick! :-)

Edit: Added the text "or a floating point number."

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


Comment on Re: Re: Re: I don't use printf enough
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-07-04 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls