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

Re: Error Checking for Array Reference

by pg (Canon)
on Nov 06, 2005 at 06:34 UTC ( #506083=note: print w/ replies, xml ) Need Help??


in reply to Error Checking for Array Reference

"Is it best to do this in the function? before it is returned?"

In general, a function should first validate the input it gets before doing any processing. This is for sure the best practice, although people don't usually do this. bobf already pointed out how to validate refs.


Comment on Re: Error Checking for Array Reference

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-04-18 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (461 votes), past polls