my %h = ( hex => sub { return sprintf ("0x%x", shift) }, bin => sub { return sprintf ("%b", shift) }, dec => sub { return sprintf ("%d", shift) }, );