Bryan Harris wrote:
> 
> What's the easiest way to check whether an array is empty?

An array in a scalar context returns the number of elements in the
array.

if ( @array == 0 ) { # explicit test for zero elements

unless ( @array ) { # implicit test for zero elements


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to