Hi,

  Sorry, it was working, found out the problem was due
to something else.

Thanks,
Anu.

  
--- anu p <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I have the following code snippet in which I open
> two
> files for read. 
> 
> For each line in file 1 (log.txt), I extract the
> test
> name, which is of format "dir/file" which is my
> pattern and search for the line with same pattern in
> file 2 (rg_table.txt). Somehow it's not working.
> 
> 
> open (TST_IN, "rg_table.txt") || die "Cannot open
> for
> read $!\n";  
> 
> open (FIN, "log.txt") || die "Cannot open file for
> read $!\n";  
>     while (<FIN>) {
>        next if !(/Config/i);
>        @log_row = split(/\s+/, $_);
>        print("[EMAIL PROTECTED] = @log_row\n");
>        $test_case = $log_row[3];
>        
>        while (<TST_IN>) {
>             if (m{\Q($test_case)\E}) {  //once
> again,
> the test_case if of form "dir/file" 
>                $row = $_;
>             }
>             print("\$row = $row, \$test_case =
> $test_case\n");
>       }
>       .....
> 
> I see that $row variable is not being updated
> properly.
> I am not sure if it is because of nested file opens
> and using $_ or bad pattern matching.
> 
> Thanks in advance for any input.
> 
> Anu.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to