perls functional functions