in reply to Re^2: Having an Issue updating hash of hashes
in thread Having an Issue updating hash of hashes
This bit will stop working once you start getting multi-digit IDs:
Obviously, BUT the OP data set doesn't say otherwise and I don't intend to think for the OP!$key = $1 if /^ID=(.)/;
Update:
You'll want this instead:
Otherwise you'll end up silently overwriting previous entries.
And what happens if the OP has two or ID with the same value, even with the code above?! Oops!!
Maybe the OP first intention of using a counter will do for all intent and purpose!
|
|---|