in reply to clean code

I think I'd make it a straight initialization from a list, using a split on either separator:

my %data = split /[=;]/, $memory_data;
That's a little reliant on the data being what you expect (anything but one "=" in a record is unsupported). It reduces the temporary variables and looping quite a bit.

After Compline,
Zaxo