cg-mkpatch uses "tac" to reverse some lines. This is not a POSIX command.
Since you already presume Perl, you can replace the use of tac with:
| perl -e 'print reverse <>' |
-- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!