in reply to How to remove duplicate key/value pairs in hash of array
Think hash of hashes here, instead of hash of arrays.foreach $file (@list_of_files) { open FILE, "$dir/$file" || die "Can't open $dir/$file: $!\n"; while (defined($line = <FILE>)) { chomp $line; next if ($line =~ /unknown|shutdown/); ($name, $ranks, $serial_numbers) = split(' ',$line); $HoH{$name}{$ranks} = 1; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to remove duplicate key/value pairs in hash of array
by Tuna (Friar) on Feb 21, 2001 at 03:06 UTC | |
by chipmunk (Parson) on Feb 21, 2001 at 03:33 UTC |