#!/usr/bin/perl -w use strict; while () { if (m|^\s*| ... m|^\s*|) { print; } } __DATA__ ...is your data consisting of the C program... #### 1101 The reductant pump needs to run slower than expected to keep the pressure. FAULT No selfhealing erasable No Degradation No Warning Lamp No Action PRIMARY #### /*XML doc start 1101 FAULT No selfhealing erasable XML doc end */ #### /*Perl doc start =some heading in Perl POD ... lines =some other heading tag in Perl POD ..... lines =cut Perl doc end */