in reply to Re: Counting elements in array of cases
in thread Counting elements in array of cases
Allow me some side notes:
1. it's destructive.
Copying the first hash with
$seen{$_->{targetL}} = {%$_};
should fix it.(can't test)
2. Also are the repeated splits not really efficient... Not sure how best to change that.
3. For better clarity I'd rather use a map and not a grep.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Counting elements in array of cases
by tybalt89 (Monsignor) on Sep 27, 2019 at 17:13 UTC | |
by tybalt89 (Monsignor) on Sep 27, 2019 at 21:09 UTC | |
by rsFalse (Chaplain) on Sep 27, 2019 at 22:35 UTC | |
by LanX (Saint) on Sep 27, 2019 at 18:04 UTC | |
|
Re^3: Counting elements in array of cases (updated)
by LanX (Saint) on Sep 28, 2019 at 13:23 UTC | |
by rsFalse (Chaplain) on Sep 28, 2019 at 18:19 UTC | |
by LanX (Saint) on Sep 28, 2019 at 19:12 UTC |