Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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
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 lurking in the Monastery: (6)
As of 2014-09-23 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls