last if $line=~/^$/; # or using length..