Dynamic namesby Dwood (Acolyte)
|on Nov 16, 2010 at 20:30 UTC||Need Help??|
Dwood has asked for the
wisdom of the Perl Monks concerning the following question:
I honestly don't see any documentation on what this feature is called so I don't know what to ask for however the best way I can think of it is the property demonstrated in the perlboot tutorial.
I want to use the same principle in a parser i'm working on, creating a new (struct or hash) for every occurence of a variable declaration in my custom script utilities.
What I want it to look like is to say, have @array_vars
format of the script declarations (global <type> <name> <value>) initializing with a value being optional.
I want (dont know if I need?) a hash//struct entry in the array to be created every time there is an occurence of a global. so:
@array-><name> = TYPE => BOOLEAN, VALUE => "UNINITIALIZED"