in reply to Reg. Expression problem

If the line numbers are always at the start of the line and you just wanted to pull out certain ones, you could say
while ( <FILE> ) { print if ( /^(1|3|4)/ ); }
If the line is always a number followed by "perlmonks(stuff)" and you just want to grab the stuff, you could say
while ( <FILE> ) { if ( /^(1|3|4) perlmonks\(([^\)])\)/ ) { print "$2\n"; } }
Is that the checking you wanted to do? If not, you need to describe what you want to be doing a bit better. Anyways, hope that helps.