Help for this page

Select Code to Download


  1. or download this
    my $string="01100110 01100101 01100101 01101100 01101001 01101110 0110
    +0111 00100000 01101100";
    
    #$string=~ s/ (\d+)/pack('B8', $1)/egx; # way 1
    $string=~ s/ (\d+)/chr(oct('0b'.$1))/egx;  # way 2
    
  2. or download this
    chr('0b'.$1) #it will throw a error message: Argument "0b01100110 " is
    +n't numeric
    
  3. or download this
    +('0b'~'0111011')          #perl6