If that doesn't work, use this

Code: Perl
if(scalar(@list) == 0)
{
  #empty
}