Help for this page

Select Code to Download


  1. or download this
    sub dec2bin { 
        my $str = unpack('B32', pack('N', shift)); 
        $str =~ s/^0+(?=\d)//; 
        return $str;
    }
    
  2. or download this
    #!/usr/bin/perl -l
    
    ...
        $str =~ s/^0+(?=\d)//; 
        return $str;
    }