#!/usr/bin/perl -w use strict; while( <> ) { next if /^\s*#/; next if /^\s*$/s; print; }