$ perl -e 'use strict;use warnings;my @foo;if( defined @foo ) { print "foo" }' |& splain defined(@array) is deprecated at -e line 1 (#1) (D deprecated) defined() is not usually useful on arrays because it checks for an undefined scalar value. If you want to see if the array is empty, just use if (@array) { # not empty } for example. (Maybe you should just omit the defined()?)