Actually it is starting to make more sense the longer I look at it. | [reply] [Watch: Dir/Any] |
I can see that my $value = $csv2hash{$csv2};
creates a variable from the words in titles stored in the csv2hash. What I'm not clear on is why is the hash is now written with a $ sign (denoting that it is a variable) rather than a % sign? Also why is $csv2 written in the curly brackets? When the hash was created it applied specifically to csv2, so why is there a need to define csv2 again in this line of code?
Thanks
| [reply] [Watch: Dir/Any] [d/l] |
See http://perl101.org/hashes.html, for example. (There are many other webpages that one can visit to get similar tutorials. This one was #3 in the list of search results when I Googled "hashes perl".)
Hashes. They are simple. I give it a key, I get back a value. Very fast.
| [reply] [Watch: Dir/Any] |