you can use matlab. or if you still need perl, then you can look at the m files of curve fit in matlab then convert it to perl module if necessary... if you do research, this is easy for you...