On Thu, Aug 23, 2001 at 09:31:52AM -0400, Craig Moynes/Markham/IBM wrote:
> This round I have encountered another similar problem. The code sample
> works for printing out the scalars, but when I attempt to print out the
> arrays instead the size of the arrays are printed, causing no end to
> confusion.
>
> If I print $MIB_TREE{$object}->children i get an array reference, so i try
> to dereference it but then I can only get the size.
Here's your problem:
> print @{$MIB_TREE{$object}->children}."\n";
You are printing the array in scalar context, which gives its size.
Try either of these:
print @{$MIB_TREE{$object}->children}, "\n";
print "@{$MIB_TREE{$object}->children}\n";
Depending on whether you want the spaces between elements.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]