And how exactly is using the fieldnames from a database to dynamically create scalar variable names an improvement over using a hash to hold the fieldnames and their respective values? I'm really curious. With the hash method, you get one hash, easily transportable by hard reference, and easily manipulated. With the symbolic ref method, you get variable names that are created in the global symbol table hash, which you must continue to use via soft reference throughout the remainder of the script unless your script both dynamically creates the variable names and hard codes them. ...if it's the latter, and you're hard coding the names at later points in the script, may as well hard code them from the beginning instead of creating them on the fly.
The fact is that there are few good uses of symbolic references. An exception is the exporting of global variables between packages... but even this should be handled with care and often via the well-proven Exporter module. Many languages don't even allow the use of soft references, and yet they still get along just fine without them.
| [reply] |