This is a small Perl program I created to allow me to easily convert IPv4 and IPv6 addresses to their .arpa formats. Doesn't sound like much, but it's been very handy for me :)
It also supports getting input from STDIN, so you can use it for shell pipes. Some examples of usage:
$ arpa.pl 217.155.246.66 66.246.155.217.in-addr.arpa. $ arpa.pl 3ffe:4005:1007:1::2 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.7.0.0.1.5.0.0.4.e.f.f.3.ip6.int.
As you can see, it handles IPv4 and IPv6 automagically. It won't allow you
to mix types either, which means firstly that 192.168:0::1 is invalid, and
thus will not work, but secondly, you cannot use the syntax of specifying
IPv4 in IPv6 such as 2001:1000::10.0.0.1
You can also use it as a shell pipe, thus:
$ (host -t aaaa irc.ipv6.freenode.net | awk '{ print $3 }') | arpa.pl
5.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.3.1.0.0.8.1.4.1.1.0.0.2.ip6.arpa.
Lastly, it can handle processing multiple addresses with one invocation, of both IPv4 and IPv6 types:
$ arpa.pl 217.155.246.66 3ffe:4005:1000:16::2 66.246.155.217.in-addr.arpa. 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.1.0.0.0.0.0.1.5.0.0.4.e.f.f.3.ip6.int.