in reply to Re^2: How to extract the values of an Array of Hashes
in thread [SOLVED] How to extract the values of an Array of Hashes
That works too, of course, and jeffa is right that trying to manually order hash elements is not very scaleable. But the OP said he wanted to "reduce the defined scalars" in his script, so I would think that he would prefer to not increase the number of dependencies, also. He is passing the hash to a sub whose parameters are known and stable, and the numbering scheme leaves room for easy maintenance and expansion. In this case numbering the hash elements is fine IMO.
|
|---|