in reply to what is difference between chr and oct?

You can convert a binary string to a number by using unpack. I took your string and came up with this. Note that I used "V", long little-endian. You may need to use something else, probably "N".
#!/usr/bin/perl use strict; use warnings; use diagnostics; my $str = "01100110 01100101 01100101 01101100 01101001 01101110 01100111 00100000 01101100"; my $int = unpack( "V", $str ); my $str1 = ord($int); my $str2 = chr($str1); binmode STDOUT, ':utf8'; print $int, "\n"; print $str1, "\n"; print $str2, "\n";