perlquestion
koti688
Hello Mates , can you please Tell what $msg Returns here.
<code>
my $maxMsgCodeLength = 15;
my $ip= 192.168.106.60;
my $port= 9000;
sub pStartBEMsg {
my ($ip, $port) = @_;
my $msgCode = "StartBE";
$msgCode = $msgCode.(" " x ($maxMsgCodeLength-length($msgCode)));
my $msg = pack("a".$maxMsgCodeLength."ia*",$msgCode, $port, $ip);
return $msg;
}
</code>
I want to know what pack and Unpack do excatly