in reply to Re^6: Hash of Arrays or Arrays of arrays? and how proceed?
in thread Hash of Arrays or Arrays of arrays? and how proceed?
...but if I need to have a different @fields stored for each database?
Well, I told you the third solution with hashes is the best, because there undefined fields are not a problem at all. With strings you always have to set all fields. You just define the empty string (or a value that is not a valid value) for any field as an empty field. So if for example the dimension is undefined for a database you would have (AA,,N...). But using the empty string is only possible if it is not a valid value anywhere. If that is not the case you would have to use some ugly construct where '@@@' or something means undefined
It print only the fields of the "last" $Database acquired
'$Database' is not '$database'. upper/lower case is important.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Hash of Arrays or Arrays of arrays? and how proceed?
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 | |
by jethro (Monsignor) on Aug 09, 2011 at 15:00 UTC | |
by paride (Initiate) on Aug 10, 2011 at 09:20 UTC | |
|