If $script::debug == "\0", then it will appear empty, but evaluate as true.
in reply to What are all the false values in Perl ((conditional, boolean, whitespace, unprintable characters)
print "\Q$script::debug" would backslash all special characters, which would at least indicate their existence, though not their nature. TMTOWTDI, though there's probably a better way ;-)
Should give you the ascii codes of each character in $script::debug, which will hopefully be useful.
my @unpack = unpack('C*', $script::debug);
print "Unpack info: @unpack\n";