#!/usr/bin/perl -w use strict; while () { if (m|^\s*| ... m|^\s*|) { print; } } __DATA__ ...is your data consisting of the C program...