in reply to To test empty array in perl

Evaluating the array in scalar context will let you know if the array has any elements:
use strict; use warnings; my @array; if (@array) { print "array not empty"; } else { print "array empty"; } __END__ array empty