Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

(tye)Re2: Sub cannot return an array?

by tye (Sage)
on Apr 20, 2001 at 01:16 UTC ( [id://73998]=note: print w/replies, xml ) Need Help??


in reply to Re: (tye)Re: Sub cannot return an array?
in thread Dereference an array reference

"They return different values when called in a scalar context." ?

You could make versions that return the first element or a reference to an array or that die when called in a scalar context. But they all return he same list in a list context.

Trying to come up with some shorthand that describes both what they return in a list context and what they return in a scalar context without ever mentioning "context" is just a mistake in my book.

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-23 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found