in reply to references to empty arrays
That sample code looks right and also prints 0 for me when i run it ... can you show your exact code? (i suspect you're either doing my @a_ref = foo(); print scalar(@a_ref); or that foo() sets @array to be (undef) ... )