a2p is the Awk to Perl translator.
It takes an {,m,n,g}awk script and writes out a Perl script that does the same thing. The script is mostly readable, so you can further hack on it.
Unlike s2p, which is always right, a2p can be fooled; it tries to mark points with questionable behaviour with a comment #???.
See note about s2p about availability, like that of the sister program s2p, as a factor towards Perl acceptance.