defined(@array) is deprecated (Maybe you should just omit the defined()?)