added perl version. more stable than c version.