in reply to Categorization Problem

Greetings,
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
%locations = ( "location1" => { "users" => { "Login1" => "Name1", "Login2" => "Name2", ... ], "ip" => "127.0.0.1", "otherinfo" => [ "info", "info2","infoblah"...] }, "location2" => { "users" => { "Login1" => "Name1", "Login2" => "Name2", ... ], "ip" => "127.0.0.1", "otherinfo" => [ "info", "info2","infoblah"...] }, ... )

In order to do that you can take advantage of autovivification with regard to datastructures.
Here is a start.
use strict; #input format for testing my $string = 'fooLogin,barName,bazLocation,Info,Info2,Infoblah'; my %locations; #split it up on commas from our example. #you would need to decide what to do with the rest. my @temp_info = split /,/,$string; $locations{$temp_info[2]}->{users}->{$temp_info[0]} = $temp_info[1]; $locations{$temp_info[2]}->{otherinfo} = [@temp_info[3..$#temp_info]];
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.
-InjunJoel
"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