record. In other words, the output from the code should only display records
whereby TIME (as a key) appears in BOTH tables, not just one.
I hope I am clear enough in my elaboration.
Thanks guys. :)
- Original Message -
From: "John W. Krahn" <[EMAIL PROTECTED]>
To:
"John W. Krahn" <[EMAIL PROTECTED]> writes:
> #!/usr/bin/perl -w
> use strict;
>
> my %data;
> for my $file ( '/data/table1', '/data/table2' ) {
> open IN, "< $file" or die "Cannot open $file: $!";
> while ( ) {
> my ( $time, $in, $out ) = split;
> $data{ $time }[0] += $
On Friday 14 December 2001 04:39, you wrote:
> Hi all,
>
> Need a little help on summarising 2 different tables into 1, based on a
> particular field.
>
> The 2 tables (they are actually content from a log file) look like the
> follow :
>
> Table #1
>
> 1006788900 198 36
> 1006788600
Perl wrote:
>
> Need a little help on summarising 2 different tables into 1, based on a particular
>field.
>
> The 2 tables (they are actually content from a log file) look like the follow :
>
> Table #1
>
> 1006788900 198 36
> 1006788600 29 35
> 1006788300 18 75
> 1006788000 19 6
Hi all,
Need a little help on summarising 2 different tables into 1, based on a particular
field.
The 2 tables (they are actually content from a log file) look like the follow :
Table #1
1006788900 198 36
1006788600 29 35
1006788300 18 75
1006788000 19 65
1006787700 42 37
10067874