Re: Matching a Scalar Variable
- From: zenmuthu@xxxxxxxxx (Muthukumar)
- Date: Tue, 29 Nov 2005 14:07:29 +0530
On 11/29/05, Mazhar <syedmazhar.hasan@xxxxxxxxx> wrote:
>
> Sorry i am passing the OPEN as
> Open (FILE1,"<one Fuile");
> Open (FILE,"<Second File");
>
> Still the string is ot matching. Help me please
Use like this:
open FD, "< file1";
open FD1, "< file2";
while (<FD>)
{
$line1=chomp($_); # chomp() Needed
while (<FD1>)
{
$line = chomp($_); # chomp() Needed
if ($line =~ /.*$line1.*/) # (.*)Not needed
{
print "Got the String\n";
}
}
}
Revert on having more queries.
- Follow-Ups:
- Re: Matching a Scalar Variable
- From: JupiterHost.Net
- RE: Matching a Scalar Variable
- From: Charles K. Clarkson
- Re: Matching a Scalar Variable
- From: Mazhar
- Re: Matching a Scalar Variable
- References:
- Matching a Scalar Variable
- From: Mazhar
- Re: Matching a Scalar Variable
- From: Muthukumar
- Re: Matching a Scalar Variable
- From: Mazhar
- Matching a Scalar Variable
- Prev by Date: Re: help about regex matching
- Next by Date: Re: Matching a Scalar Variable
- Previous by thread: Re: Matching a Scalar Variable
- Next by thread: Re: Matching a Scalar Variable
- Index(es):
Relevant Pages
|
|