On 09/29/2017 07:25 PM, Brandon Allbery wrote:
The point of a hash is that it computes hash values from its keys for
fast lookup,
Not me. I use them to "organize" data all in one easy to look
up place. For example:
my %SmtpIni = [
'DebugTrace' => "",
'smtp' => "",
'port' => "",
'username' => "",
'password' => "",
'from' => "",
'to' => @[""],
'Subject' => "",
'Text' => "",
'FileName' => @[""] ];
You will notice that all the smtp information is organized
in one variable for easy retrieval. And that %SmtpIni<password>
is absolutely obvious what password it refers to. No guessing
involved. No trying to figure out who goes to whom, especially
when using a global variables (which I try to keep to a minimum).
It is all about organization and readability for me, not speed.
If I wanted speed, I would go to the dark side and learn C.
The solution is to create and "index" of the hash and loop
on the index instead of the has if I want to see things in order.
That actually sounds like a fun code.
-T