got one function working between c and perl !!!!