use UNIVERSAL 'isa'; foreach $item (@array) { if (isa($item, 'ARRAY')) { print "We've got an array!!\n"; } }