sub ProcessPIDs { # print "Inside ProcessPIDs \n"; # Process the input arguments my ( $nickname, $ref_nicknametocommand ) = @_; my %InSubNickNameToCommand = %{$ref_nicknametocommand}; # De-reference the reference to a hash my $ccmd; $ccmd = $InSubNickNameToCommand{ $nickname }; # need further ERROR checking here !!!!!! my $newcmd = '0101'; print "\$ccmd; $ccmd ".length($ccmd). " \$newcmd; $newcmd ".length($newcmd)."\n"; # my $newcmd = $ccmd; # not work my $response = Serial_TrxRcv($newcmd); my $result; ...etc...