Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How to detect a returns value gracefully

by Joost (Canon)
on Feb 26, 2009 at 11:43 UTC ( [id://746523]=note: print w/replies, xml ) Need Help??


in reply to How to detect a returns value gracefully

The code you posted doesn't work like you described.

There is no way to test if a function returns a list or not, since capturing the return value(s) forces the function to return either a list (which isn't an array) or a scalar. This is by design and you cannot work around it.

  • Comment on Re: How to detect a returns value gracefully

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://746523]
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: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found