#!/usr/bin/perl -w use strict; $_= unpack 'b*',chr pop and s/^0/1/ || s/(^1+)0?/'0' x length($1).'1'/e and print ord pack 'b*',reverse$_ or die 'japh';