good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: can i concatenate various value to form a unique keyby JavaFan (Canon) |
on Jul 03, 2009 at 10:17 UTC ( [id://777012]=note: print w/replies, xml ) | Need Help?? |
As explained else where in the thread, that has the potential to not be unique.
It's a little known feature that Perl actually supports autoconcatenation of strings used as hash keys, joining them together using $;, which by default contains "\034" which is rare enough that it's unlikely unwanted duplicates are formed. So, you can write: without having to join them yourself. This was how people did multilevel hashes using perl4. For more details, see the perlvar entry about $;.
In Section
Seekers of Perl Wisdom
|
|