Another way to test whether a list is empty is as follows

Code:
my @arr ;
if ( $#arr== -1 )
{
    print "Array not empty\n";
}
else
{
    print "Array empty\n";
}
$# will contain the index value of a list.
If a list is not having any value means this will be -1.
If a list is having only one element means this will be 0 and so on.