in reply to Re: list item comparison
in thread list item comparison
There is no need to check if the $item exists in the hash. When you increment a the value for a key which doesn't exist, the key springs into existence. So lines 8-11 can be replaced by:
$check{$_}++ for @list;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: list item comparison
by dasgar (Priest) on Jul 13, 2012 at 03:28 UTC | |
by nitin1704 (Sexton) on Jul 13, 2012 at 04:49 UTC | |
by johngg (Canon) on Jul 13, 2012 at 08:52 UTC | |
by nitin1704 (Sexton) on Jul 13, 2012 at 09:16 UTC |