pack and unpack. : unpack « System Functions « Perl






pack and unpack.

      
#!/usr/local/bin/perl 

@list_of_integers = (11, 26, 43); 
$mystring = pack("i*", @list_of_integers); 
@list_of_integers = unpack("i*", $mystring); 
print ("@list_of_integers\n"); 

   
    
    
    
    
    
  








Related examples in the same category

1.Pack to hex string and unpack
2.Combine unpack and pack in one statement
3.The Template pack and unpack Types and Values
4.Using pack and unpack to convert decimal number to binary number back and forth