Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Function Prototype Context Conversion

by japhy (Canon)
on Jun 12, 2002 at 20:05 UTC ( #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? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2021-07-23 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?