http://www.perlmonks.org?node_id=604547

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hiya.

OK, maybe im looking in the wrong places or something, I found loads on removing duplicates from arrays but the examples they gave only seemed to work for integers.

One solution is to pop off each element of the array and compare it against every other element remaining. If there's a match, chuck it, otherwise it must be unique so add it to @output. Surely there's a more efficient perlesque way though?

So the idea is if I have an array:

@array = ("abc","def","abc","ghi","ghi","abc","jklm","abc","def")
The output should be:
@output = ("abc","def","ghi","jklm")
Can someone offer a Perl newbie a hand?!

Also can anyone suggest other good sites I can draw code samples/tutorials/information from?

Thanks!