RE: Regarding reg. expr

2002-03-21 Thread Timothy Johnson
Sweet. I always forget about the little things Perl does for you in the background. -Original Message- From: kim, kiseok To: [EMAIL PROTECTED] Sent: 3/21/02 11:00 PM Subject: Re: Regarding reg. expr $. is line number of the last file handle :-) so, my $counter; while(){ if

Re: Regarding reg. expr

2002-03-21 Thread kim, kiseok
ve the regex compiled only once. | | my $counter; | while(){ |$counter++; |if($_ =~ /(\b$input\b)/){ | print "Found match on line number $counter\n"; |} | } | | | -Original Message- | From: viswanathan sundararajan | To: Timothy Johnson | Sent: 3/21/02 9:46 PM | Su

RE: Regarding reg. expr

2002-03-21 Thread Timothy Johnson
unter++; if($_ =~ /(\b$input\b)/){ print "Found match on line number $counter\n"; } } -Original Message- From: viswanathan sundararajan To: Timothy Johnson Sent: 3/21/02 9:46 PM Subject: RE: Regarding reg. expr Hi, Thanx for ur reply.This is exactly what i am loo

RE: Regarding reg. expr

2002-03-21 Thread Timothy Johnson
m: viswanathan sundararajan To: [EMAIL PROTECTED] Sent: 3/21/02 9:14 PM Subject: Regarding reg. expr Hi group, I have the following code. $in=join("\n",@rootwords); while($in=~/(\b$input\b)/g) { . . } Is there any way of finding out the line no where $in

Regarding reg. expr

2002-03-21 Thread viswanathan sundararajan
Hi group, I have the following code. $in=join("\n",@rootwords); while($in=~/(\b$input\b)/g) { . . } Is there any way of finding out the line no where $input is matched with $in.$in may contains many instances of $in.I need all those line nos. Thanx in advance, vi