Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Check if object at start of array

by RMGir (Prior)
on Mar 17, 2009 at 14:53 UTC ( #751216=note: print w/ replies, xml ) Need Help??


in reply to Check if object at start of array

I suggest reading perlref and searching for "cheap numeric compare of references"...


Mike


Comment on Re: Check if object at start of array
Replies are listed 'Best First'.
Re^2: Check if object at start of array
by ikegami (Pope) on Mar 17, 2009 at 14:58 UTC

    That will work in most circumstances, but note these exceptions:

    The linked code can produce undesirable results (false positives, false negatives) if the inserted object or an object in the array overrides numification or numerical equivalency.

    The linked code can produce undesirable results (false positives, warnings) if the array contains non-references.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2015-08-30 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (346 votes), past polls