use min/max from xperlfunc

while this was really the better place for those?