"Sputnik" help  
Sputnik Help
Language Reference - Operators - Operator xx (Repetition As Array)

Operator xx

Repetition as array. e.g.

my $value = "Test" xx 2;
printr $value;
// PRINTS
// Array
// (
//     [0] => Test
//     [1] => Test
// ) 
my $value = array("Cat", "Dog") xx 2;
printr $value;
// PRINTS
// Array
// (
//     [0] => Array
//         (
//             [0] => Cat
//             [1] => Dog
//         )
//     [1] => Array
//         (
//             [0] => Cat
//             [1] => Dog
//         )
// )

It can be used on return value from functions like:

Function ArrRet()
{
    return array("Cat", "Dog");
}
my $value = ArrRet() xx 2;
printr $value;
// PRINTS
// Array
// (
//     [0] => Array
//         (
//             [0] => Cat
//             [1] => Dog
//         )
//     [1] => Array
//         (
//             [0] => Cat
//             [1] => Dog
//         )
// )

To see a list of all the operators go here.


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