CROP: while () { m#^\s*$# ? next CROP : last CROP; } # Your code here, now that the blank lines are gone