Tinkering with some of the suggestions here, I was looking for a way to get the line number in there. Thought maybe I could just concatenate it in there:
With this test file: string strung strang string other junk blabbitty string other junk while(<>){ push @array,$_ =~ /(string)/g . " lineno " . $.; } for(@array){ print $_ . "\n"; } Results: 1 lineno 1 1 lineno 2 So it gives the line number alright but botched the ability to grab the hits. Whats a sneaky way to get the linenumber where the hit occured? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]