Re: Summarising tables - further question

2001-12-15 Thread Perl
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:

Re: Summarising tables

2001-12-14 Thread Michael R. Wolf
"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] += $

Re: Summarising tables

2001-12-14 Thread Johan H
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

Re: Summarising tables

2001-12-14 Thread John W. Krahn
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

Summarising tables

2001-12-13 Thread Perl
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