Problem sending array using "pack" function in perl

I am using the pack function to send the contents of a list to a socket. The code is below.

$message_array = pack ("(A*)*", @ul_dcch_message); 

List contents

 @ul_dcch_message = (101101012411011, "emergency", 25, "simple"); 

This piece of code sends all the lines and numbers contained in the list. But if the numbers on the list exceed 15 digits, I get something like this,

  1.01101012411011e+16emergency25simple 

My requirement: I want to "pack" numbers, as well as strings, numbers will exceed 15 or more digits.

Is there any way to do this? Are there any other templates for this?

Any help is appreciated.

+4
source share
1 answer

Enter a number so pack can interpret it as a string of characters, not a number represented in exponential notation.

 @ul_dcch_message = ( '101101012411011', 'emergency', '25', 'simple' ); 
+7
source

All Articles