in reply to array check help

A simple negated if test will do...
print "empty" if !@NotFound;

Replies are listed 'Best First'.
Re: Re: array check help
by halley (Prior) on May 16, 2003 at 19:51 UTC

    I like code that reads well. I was going to say print "empty" if not @NotFound but realized it's finally a good reason to use the unless keyword.

    print "empty" unless @NotFound;

    --
    [ e d @ h a l l e y . c c ]