in reply to Dereferencing complex data w/o intermediate variable
And, while I don't see exactly where the array '@colnames' is coming from, your third line can be rewritten as well:my @names = @{$r_cmds->{names}};
In scalar context, @arr will evaluate to the number of elements it contains. Therefore the following expression is always[*] true ($#arr+1 == @arr)my $names_qty = @colnames;
Is that what you are looking for?
* for sane values of $[.... but it would be a bad idea to go mucking around with that anyway.
-Blake
|
|---|