Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
laziness, impatience, and hubris
 
PerlMonks  

Re: Answer: How can I display a unique array if it contains some repeated elements

by halley (Prior)
on Aug 14, 2003 at 17:47 UTC ( [id://284026]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: How can I display a unique array if it contains some repeated elements
in thread How can I display a unique array if it contains some repeated elements

Okay, that's a really bad idea. You're naming a sub suggestively and then offering two OPPOSITE functionalities.

You're expecting the caller to choose the desired action with an UNRELATED and NON-MNEMONIC distinction like ref($_[0]) vs not ref($_[0]).

What if you send a plain @array1 and the zeroth element is an array ref? You might want to get a unique set of array refs, but this function's not going to help there.

--
[ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://284026]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.