my $data = $text->get('1.0','end'); # Presumed to return contents of desired field if ($data =~ /^.+$/) { # non-empty field } else { # empty field }