cowsay is distributed under the same licensing terms as Perl: the Artistic License or the GNU General Public License. If you don't want to track down these licenses and read them for yourself, use the parts that I'd prefer:
(0) I wrote it and you didn't.
(1) Give credit where credit is due if you borrow the code for some other purpose.
(2) If you have any bugfixes or suggestions, please notify me so that I may incorporate them.
(3) If you try to make money off of cowsay, you suck.
(0) Copyright (c) 1999 Tony Monroe. All rights reserved. All lefts may or may not be reversed at my discretion.
(1) This software package can be freely redistributed or modified under the terms described above in the "cowsay License" section of this file.
(2) cowsay is provided "as is," with no warranties whatsoever, expressed or implied. If you want some implied warranty about merchantability and/or fitness for a particular purpose, you will not find it here, because there is no such thing here.
(3) I hate legalese.