How I turn a binary number into its decemial equivlant in perl.

Code:
$bin = "1000";

???????
None of the examples i have seen seem to help.