|Keep It Simple, Stupid|
Re: Categorization Problemby injunjoel (Priest)
|on Nov 02, 2005 at 22:32 UTC||Need Help??|
Well if I am reading your question right I would suggest using a hash for the locations array you mentioned. That way the location is a unique key in the hash and can thus be found a lot easier than grepping through an array. Now the user information. I would store that in a "users" key in the location hash, either a hash of login as the key to names or an array. This would allow for you to add more categorical information to the location structure, maybe ip address, or something similar.
so conceptually I would think something like this
In order to do that you can take advantage of autovivification with regard to datastructures.
Here is a start.
First off though I would read perldsc and perlref. Oh and you will want to use Dumpvalue or Data::Dumper to check your work.
Good luck and I hope that helped.
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo