in reply to suppress the elements that appear more than one time in a list
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: suppress the elements that appear more than one time in a list
by steph_bow (Pilgrim) on Aug 01, 2007 at 12:54 UTC | |
by johngg (Canon) on Aug 01, 2007 at 13:05 UTC |