|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
I was meditating about advising List::MoreUtils:uniq as a best practice, cause I thought it prevents any stringification problems.¹
Unfortunately it doesn't! :(
thats quite disappointing for an XS-module ... EDIT: Well at least it preserves order... Cheers Rolf ¹) I should explain, the problem with using hashes for set operations is that keys are stringified, that means working with anything which isn't a string or at least a scalar comes with a risk. Practically it's not possible to safely use a ref as a key because of the resulting string is irreversible.
UPDATE: improved code example... In reply to Re^2: Syntax explanation required (uniq)
by LanX
|
|