sub hex_dump { unpack "H*", $_[0]; } print "\$oldname = [", hex_dump($oldname), "]\t"; print "\$newname = [", hex_dump($newname), "]\n";