use strict; use warnings; my $value = "0b101010"; printf "$value is %d decimal\n", oct($value);