Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    
  2. or download this
    my (@eachnum, $binary, $good, $decimal);
    
  3. or download this
    print("\n\nEnter a binary number:");
    chomp(my $binary=<STDIN>);
    if ( $binary =~/\D.*/ ) { 
        print("Not a binary number!\n");exit;}
    
  4. or download this
    die "Not a binary number" if $binary =~ /[^01]/
    
  5. or download this
    convb2d($binary)
    
  6. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
      ( "N", pack("B32", substr("0" x 32 . $binary, -32 )));
    }