added perl low-level hook