in reply to Binary to Decimal (zdog's way)

Since you reference it, let me add that most of us use the far more compact and easy to retype and demonstratably faster code like:
$_ = shift; print unpack "N", pack "B*", ("0" x (32 - length)) . $_;

-- Randal L. Schwartz, Perl hacker