in reply to Cannot seem to remove empty/blank lines

This one works, but I'm sure there's a more subtle approach..
#!/usr/bin/perl open(LOG,"+</etc/spamdomains.txt") || die "Can't open spam file\n"; while (<LOG>){ unless(/^\s$){ print; } } close(LOG);