:16() hex conversion and other bits and bobs - based on reread of http://perlcabal.org/syn/S02.html