in reply to merging to databases... Should be easy...
It'll take a long time, but do something like
my %firstDataSet; foreach (my $line = <FIRST_FILE>) { my @data = split /\s+/, $line; $hash{$data[0]}{$data[1]} = $data[2]; } foreach (my $line = <SECOND_FILE>) { my @data = split /\s+/, $line; if ($hash{$data[0]}{$data[1]}) { print OUT_FILE "$data[0] $data[1] $hash{$data[0]}{$data[1]} $d +ata[2]\n"; } }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: merging to databases... Should be easy...
by runrig (Abbot) on Oct 03, 2001 at 20:28 UTC | |
|