"Sputnik" help  
Sputnik Help
Language Reference - Operators - Operator qwi (Quick Int32 Array)

Operator qwi

The Quick Int32 Array operator.

printr qwi"H\x11223344ello";
// PRINTS
// Array
// (
//     [0] => 72
//     [1] => 304297038
//     [2] => 108
//     [3] => 108
//     [4] => 111
// )

This is useful for defining an array of 32-bit integers in string format. It can be used to represent a sequence of large numbers which may not fit into a regular string format.

Using a foreach loop

my $array = qwi"H\x11223344ello";
foreach (my $v in $array)
{
   say sprintf("Value dec %1^d hex 0x%1^X", $v);
}
// PRINTS
// Value dec 72 hex 0x48
// Value dec 304297038 hex 0x1223344E
// Value dec 108 hex 0x6C
// Value dec 108 hex 0x6C
// Value dec 111 hex 0x6F

To see a list of all the operators go here.


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org