in reply to need a clearer understanding
It is really difficult to know where this question is going. As you can see from perldoc -f chomp, this function removes any “newline” characters from the record that has just been read. The next statement looks to see if the resulting string is “entirely empty.” (Notice that it does not consider whether or not the string “consists entirely of spaces,” but that’s another story.) Beyond that, we really need more clarification and guidance from you... Help us to help you.