note
ultibuzz
<p>after smathing and throwing some office stuff the blockade is gone and i managed to code somthing that is working but is far away from being nice code<br><code>#!"C:\perl\bin\perl.exe"
use warnings;
use strict;
open(IN, '<', "traffic_compare.txt") or die("open failed: $!");
my @tmp;
while (<IN>) {
chomp;
push @tmp,(split(';',$_))[0];
}
close(IN);
my @tmp_new= do { my %seen;grep !$seen{$_}++, @tmp };
my %table_hoa;
foreach my $groups (@tmp_new) {
open(IN, '<', "traffic_compare.txt") or die("open failed: $!");
while (<IN>) {
(my $id, my $value) = split(';',$_);
if ($id == $groups) {
push @{ $table_hoa{$groups} }, $value;
}
}
close(IN);
}
</code><br>thanks for the hints, and are there any idears how to amke this code a bit nicer ?<br>i don't like this @tmp pushing everything in there removing the duplicates<br><br>kd ultibuzz</p>
596052
596052