Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Remove redundency from an array

by Roy Johnson (Monsignor)
on Sep 24, 2007 at 21:48 UTC ( [id://640832]=note: print w/replies, xml ) Need Help??


in reply to Re: Remove redundency from an array
in thread Remove redundency from an array

Better to use either a lexical hash in the do-block, or an anonymous hash:
@array = keys %{ {map {$_,undef} @array} };

Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-23 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found