binmode(S); @Data=("asd"); $binary=pack("C/A*",@Data); # its working fine print S $binary; #### use Convert::Binary:C; $c = Convert::Binary::C->new; binmode(S); my $c = Convert::Binary::C->new->parse(< 3,*ver => "asd",}; # it gives error $binary = $c->pack('R', $data); print S $binary;