in reply to Regex, loops and subs

I wonder if a better way wouldn't be to use something from CPAN. There seem to be a number of omim-related modules there.