$ perl -E 'my (@x, @y); say defined(@x) ? 1 : 0; say defined(@y) ? 1 : 0' Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at -e line 1. $ perl -E 'my (@x, @y); say @x ? 1 : 0; say defined(@y) ? 1 : 0' Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at -e line 1. $ perl -E 'my (@x, @y); say @x ? 1 : 0; say @y ? 1 : 0' 0 0