#!/usr/bin/perl
print "Ingrese un numero en base 2: ";
$num = <stdin>;
$b4 = 0;
$pot11 = 1;
$pot1 = 1;
$sum1 = 0;
$b8 = 0;
$pot22 = 1;
$pot2 = 1;
while ( $num != 0 ) {
$a = int( $num / 10 );
$d = $num - 10 * $a;
$num = $a;
$sum1 = $sum1 + $d * $pot1;
$sum2 = $sum2 + $d * $pot2;
$pot1 = $pot1 ...