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

Re: Re^2: Function Prototype Context Conversion

by japhy (Canon)
on Jun 12, 2002 at 20:48 UTC ( #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? | Other CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2021-08-05 02:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (44 votes). Check out past polls.

    Notices?