Re: compare 2 data files and extract fields for matched lines
- From: "dn.perl@xxxxxxxxx" <dn.perl@xxxxxxxxx>
- Date: Thu, 27 Dec 2007 08:50:33 -0800 (PST)
On Dec 27, shree <srigowr...@xxxxxxxxxxx> wrote:
open (FILE_IN1, $File_In1) or die "cannot open file in FILE_IN1 $!";
@array1 = <FILE_IN1>;
close (FILE_IN1);
Start with two sample files of 2-3 lines each.
Make sure it is okay to read the entire file
in an array by printing the value of @array1
and printing the value of $line1 after running
foreach $line1 (@array1); and read the files
line by line instead of reading them all at once.
Something like :
while ($line1 = <FILE_IN1>) { statements }.
As part of debugging the code, print out the value
of $line1 to see for yourself what strings or arrays
your code is dealing with.
.
- References:
- Prev by Date: compare 2 data files and extract fields for matched lines
- Next by Date: Re: compare 2 data files and extract fields for matched lines
- Previous by thread: compare 2 data files and extract fields for matched lines
- Next by thread: Re: compare 2 data files and extract fields for matched lines
- Index(es):
Relevant Pages
|
|