#!/usr/bin/perl use strict; use warnings; my $z = ~0; printf "%b 0x%x %d\n", $z, $z, $z;