more useful options | |
PerlMonks |
Re: How to connect more arrays to a new arrayby samurai (Monk) |
on Apr 28, 2003 at 02:22 UTC ( [id://253573]=note: print w/replies, xml ) | Need Help?? |
Hashes are the best data structures to use when trying to create arrays with unique values, because the keys are guaranteed to be unique (duplicate keys are overwritten as opposed to being appended to the stack). When you start using hashes to do lookups for uniqueness, you've learned a valuable skill. Here's some commented code for how to do this:
Hashes are your friend (I use them a LOT when looking for duplicates in company data files). Learn to use them wisely and you'll appreciate perl's power and simplicity a lot sooner. Or, for a quickie:
--
In Section
Seekers of Perl Wisdom
|
|