in reply to Re: combining 2 files with a comon field
in thread combining 2 files with a comon field
use strict; my %hash; while(<>){ (my $first, my $second) = split("|",$_); $hash{$first} = $second; } my $second while(<>) { my $line = $_ (my $first, $second) = split("|", $line); } foreach my $key (keys %hash){ my @list = ($hash{$key}, $second); $joined = "@list"; $hash{$key} = $joined; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: combining 2 files with a comon field
by bart (Canon) on May 18, 2005 at 11:56 UTC | |
|
Re^3: combining 2 files with a comon field
by TheStudent (Scribe) on May 18, 2005 at 12:03 UTC |