Pages

Thursday, April 12, 2012

verify whether array is empty perl

use strict; use warnings;
my @array;

if (@array)
{
print "array not empty";
}
else
{ print "array empty";
}
------------------------------------------
unless (@array)
{
print "There is element inside array.";
exit(1);
}

0 comments:

 

site weekly hits