Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I have written in the past this short routine to manipolate my data structure (array of hashes).
for my $h (@suggestionsTemp) { push @suggestionsUnsorted, ($targets{$$h{targetL}}={targetL=>$ +$h{targetL}}) unless $targets{$$h{targetL}}; $targets{$$h{targetL}}{origin}{$$h{origin}}++; $targets{$$h{targetL}}{count}++; } $$_{origin} = join ', ', sort keys %{$$_{origin}} for values %targ +ets;
It basically counts how many times the value of 'targetL' is repeated in the structure, sets the frequency in 'count' and joins all the values of 'origin' of all repeated 'targetL'. I am wondering if it is possible to use the same routine to do the match (here with unless) in a case insensitive way the 'targetL'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: data manipulation case insensitive match
by Corion (Patriarch) on Nov 16, 2019 at 14:21 UTC | |
by Anonymous Monk on Nov 16, 2019 at 14:38 UTC | |
by Corion (Patriarch) on Nov 16, 2019 at 16:16 UTC | |
|
Re: data manipulation case insensitive match
by tybalt89 (Monsignor) on Nov 16, 2019 at 16:47 UTC | |
|
Re: data manipulation case insensitive match
by tangent (Parson) on Nov 16, 2019 at 16:41 UTC |