Build your hash inside your while loop, and get rid of @New_Table:
my %Hash; while (<INFILE>) { # the lines are composed of elements separated by a point comma <- +- it's a called a semicolon! chomp; my ( $k, $v )= split /;/; $Hash{$k} += $v; } my @unique = keys %Hash;
In reply to Re: suppress the elements that appear more than one time in a list
by FunkyMonk
in thread suppress the elements that appear more than one time in a list
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |