refactor trigger hash inversion for perl v5.10.1