dnswalk fails with "Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/local/bin/dnswalk line 59." perl 5.24.1 FreeBSD 11.0-RELEASE-p9
I can't reproduce the error on FreeBSD 11.0-RELEASE-p1 running perl 5.24.1 or on 11.1-RELEASE running perl 5.24.1 or 5.24.2. Have you tried the most current version of the program?
This was fixed a while ago in ports r440707.