fix perl opts routine