#!/usr/bin/perl -w use strict; while (<>) { # loop to next line if it contains whitespace only next if /^\s+$/; print; }