Hi,

The dimension of the data increases by each pass by reference.

In this subroutine, @FORMATTED_OUTPUT was filled up as a 2 dimensional array 
$FORMATTED_OUTPUT[$i][$j].
sub ABC {
...... SOME CODE
return (\$rows, \$cols, [EMAIL PROTECTED]);
}

In subroutine DEF, ABC is called, and the dimension of @buffer increased to 3, ie it 
became a three dimensional array and the array elements can be accessed as 
$buffer[0][$i][$j].
sub DEF {
my @buffer, $row, $col;

        ($$row, $$col, @buffer) = ABC('INPUT', 'Interface', 'OUTPUT', 'IP-Address');
        PRINT (\$$row, \$$col, [EMAIL PROTECTED]);
}

sub PRINT {
     do the prinnting of the buffer whose row and columns are also passed.
     Here the dimension of @buffer becomes 4.
     here the array elements can be accessed as $buffer[0][0][$i][$j].
}


How can I avoid the increases in dimension of datatype when passed by reference.
Please help.

Regards
Rajeev

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to