in reply to Determine largest key in hash

Is there a reason to use a hash instead of an array for the first layer (update: or even the dynamic data)?

@data = ( { # Not quite certain what purpose this serves # 1 => "", #dynamically created # Perhaps something like this instead... dynamic_data => [ ... ], name => "", that => "", }, # ... and so on );

Then, your code would instead be ...

push @{ $data[0]{dynamic_data} }, "blah"; push @{ $data[0]{dynamic_data} }, "bleh";

I would rename dynamic_data to something more descriptive, of course.

Perhaps a description or example of how you use the data or what it represents might help shake out an appropriate data structure.

--MidLifeXis