Extending runrig's answer to cover the case where "blank" could include whitespace characters
(as merlyn's answer already does, negatively): Use /^\s*$/
As in:
while (<>) { print "blank line detected\n" if /^\s*$/; }
In reply to Re: How do I test for a blank line when reading from a file?
by thanos1983
in thread How do I test for a blank line when reading from a file?
by bravismore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |