Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Function Prototype Context Conversion

by japhy (Canon)
on Jun 12, 2002 at 20:05 UTC ( [id://173986]=note: print w/replies, xml ) Need Help??


in reply to Function Prototype Context Conversion

Perhaps you don't know that what the $ prototype does is place scalar(...) around the given argument to the function.
sub foo ($$) { print "<@_>\n"; } foo(@this, %that); # foo(scalar(@this), scalar(%that));
An array evaluated in scalar context returns its size.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://173986]
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-04-24 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found