#!/opt/gnu/bin/perl while (<>) { if ( ! ($_ =~ m/^\s*%/) ) { print $_ } }