I have an array where elements of the array have values that are separated by tabs. For example:
client_name \t owner \t date \t port_number.
I need to convert that into a hash so it can be dumped into a MySQL database. Something like:
my %foo = ();
$foo{date} = "111208";
$foo{port} = "2222";
$foo{owner} = "ownername";
$foo{name} = "clientname";
The problem I have is that there are duplicate client names but they exist on different port numbers. If I convert it directly to a hash using client_name as a key it will delete duplicate client names. The MySQL table is indexed based on {name} and {port}.
Is there any way I can convert this into a hash without losing duplicate client names?