in reply to Reg. Expression problem
If the line is always a number followed by "perlmonks(stuff)" and you just want to grab the stuff, you could saywhile ( <FILE> ) { print if ( /^(1|3|4)/ ); }
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.while ( <FILE> ) { if ( /^(1|3|4) perlmonks\(([^\)])\)/ ) { print "$2\n"; } }
|
|---|