Have you included
use strict; use warnings;
There is no array with @colnames, so its printing 0, You have $colnames variable which has the array reference, you need to dereference it like
print "A size:" . @$colnames . "\n";In reply to Re: Looping through an Array
by vinoth.ree
in thread Looping through an Array
by jarrodb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |