shasundaram007 has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, How to PACK the "C/A*" data type by using Convert::Binary:C module. Because the datatype is Pointer.
Ex.
binmode(S); @Data=("asd"); $binary=pack("C/A*",@Data); # its working fine print S $binary;
================================================ I need by below ================================================
use Convert::Binary:C; $c = Convert::Binary::C->new; binmode(S); my $c = Convert::Binary::C->new->parse(<<ENDC); typedef struct { unsigned char type; /* length(*ver) */ char *ver; } R; ENDC $data = {type => 3,*ver => "asd",}; # it gives error $binary = $c->pack('R', $data); print S $binary;
Thanks Shan