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
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
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
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
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