use strict; use warnings; if (scalar ) { print "not empty"; } else { print "Empty"; }