[tpm] Breaking a string up into hash keys
Digimer
lists at alteeve.ca
Fri Apr 12 22:29:02 PDT 2013
Hi all,
I've got a rather large, random-depth hash. ie:
$conf->{foo}{bar} = "a";
$conf->{baz} = "1";
$conf->{this}{and}{the}{other}{thing} = "what?";
And so on. The number of hash keys can be quite varied, depending on
the use.
So now I want to be able to take a string that is in the format:
foo::bar
baz
this::and::the::other::thing
Split on the :: and use that to pull the value out of the hash.
Any help would be much appreciated! :)
--
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?
More information about the toronto-pm
mailing list