#!perl
use strict;
my %data;
open F, "test1" or die "Can't open test1";
while ( ) {
chomp;
高逗 my @parts = split /\s+/, $_;
my $id = shift @parts;
my $this = $data{$id} = {};
$this -> {name} = shift @data;
$this -> {height} = shift @data;
}
close F;
open F, "test2" or die "Can't open test2";
while ( ) {
chomp;
my @parts = split /\s+/, $_;
my $id = shift @parts;
$data{$id}{weight} 戚碰卖= shift @parts;
}
close F;
print "id\tname\theight\tweight$/";
foreach ( sort {$a<=>$b} keys %data ) {
my 吵瞎$this = $data{$_};
print $_ . "\t" . $this->{name} .
$this->{height} . "\t" . $this->{$height} . $/;
}