I have to assign coordinates (right,left,top,bottom) to a number of objects residing in a 8 x 4 grid. First I wanted to create objects with get and set methods but cant find a way to name the objects the way I want to. I'm looping through the grid in two nested for-loops and wanted to create an object with the counter as an extension:
$asset_$counter = Asset->new();
That doesn't work because the variable-name is an address returned by the constructor.
So is this still the right way - OO? Would like that because it's handy. Or should I do something else .. e.g. creating a hash where each key points to an array of my values?
Our community of experts have been thoroughly vetted for their expertise and industry experience.