use strict; use warnings; if ("\x00" eq "") { print "they are the same"; } else { print "they are not the same"; }