Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re^2: Function Prototype Context Conversion

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


in reply to Re^2: Function Prototype Context Conversion
in thread Function Prototype Context Conversion

tadman: You've asked for a scalar, but you're getting a list.

Ah, not so! You've ask for a scalar, but you're getting an array! If you had done:

sub foo ($) { ... } @a = (1,10,100); foo(@a); # no error, '3' is passed to foo() foo(1,10,100); # error, too many args
you'd have seen. Arrays and lists are not the same thing.

_____________________________________________________
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://174001]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-20 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found