When you say cite, do you mean as in a citation on a bibliography / works cited section? I've never done this. For the few academic projects where I've utilized programs (aside from undergrad CS work where writing a program WAS the assignment) I have simply stated in the work something such as 'A Perl program was created to determine blah blah blah . . .'
I suppose you could include a copy of the source as an appendix. I've never done so and haven't ever received negative feedback for that, or failing to included some sort of reference in a works cited section. But to be candid, I'm not confident that I've completed enough of such projects to know for sure if I've done everything right.
Hmm, now that I'm reviewing your post and what I just wrote I realize that I automatically assumed you meant an academic manuscript (like a thesis or whatnot), despite other possibilities. Is this academic? What's proper as far as providing a citation might vary by domain.