in reply to Re^4: Hash of Arrays or Arrays of arrays? and how proceed?
in thread Hash of Arrays or Arrays of arrays? and how proceed?
Oh yes, you will be an expert on references and complex data structures after this ;-)
One advice: You could store your attributes (i.e. AA, 5 'N' etc.) in strings (concatenated by ':' for example) or in arrays (i.e. index 0 would be 'AA', index 1 the dimension...). But usually the most maintainable way to do this is with a hash.
#add values $fields{$database}[$fieldno]{dimension}=5; $fields{$database}[$fieldno]{type}='N'; # check if an attribute 'something' exists if (exists $fields{$database}[$fieldno]{something}) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Hash of Arrays or Arrays of arrays? and how proceed?
by paride (Initiate) on Aug 04, 2011 at 07:56 UTC | |
by jethro (Monsignor) on Aug 05, 2011 at 09:21 UTC | |
by paride (Initiate) on Aug 05, 2011 at 11:39 UTC | |
by jethro (Monsignor) on Aug 05, 2011 at 14:27 UTC | |
by paride (Initiate) on Aug 09, 2011 at 08:36 UTC | |
|