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

Re^3: Check if sort has changed order (eq)

by Krambambuli (Deacon)
on May 10, 2013 at 10:43 UTC ( #1032931=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Check if sort has changed order (eq)
in thread Check if sort has changed order

That won't work for whatever sort condition.

I'd probably rather compare the MD5 checksum of the scalar references in the list before and after the sort.


Comment on Re^3: Check if sort has changed order (eq)
Re^4: Check if sort has changed order (eq)
by Anonymous Monk on May 10, 2013 at 23:03 UTC

    That won't work for whatever sort condition.

    Sure it will, its comparing memory addresses not data, so the sort condition is irrelevant; only relevant are how much ram you have and how you initialized the array; if the memory addresses aren't sequential before sorting, it won't work.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2014-09-19 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (147 votes), past polls