Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: removing duplicates entries from an array

by smokemachine (Hermit)
on Jan 06, 2006 at 18:40 UTC ( [id://521585]=note: print w/replies, xml ) Need Help??


in reply to removing duplicates entries from an array

could be this?
perl -e '@a=qw/z a r a z a a x/; $regex="|";foreach(@a){$regex.=$_."| +" unless /^"$regex"$/ && $regex}@a=split /\|/, $regex; print @a'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found