Minor code style nit: label => $ML{...} would be fine here, double quotes aren't required since you're not substituting it into a larger string.