Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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

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?
[runrig]: Happy Eclipse Day!
[LanX]: Once upon a time there was light in my life But now there's only Trump in the dark Nothing I can say A total eclipse of the heart

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2017-08-21 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (325 votes). Check out past polls.

    Notices?