Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
OK I see the problem, this is only partially solving your case:
use strict; use warnings; use Data::Dump qw/pp dd/; my %hash = ( 'rendition' => '3', 'automation' => '2', 'saturation' => '3', 'mass creation' => 2, 'automation technology' => 2, # why did you post broken code with a missing comma? 'automation technology process' => 3 ); delete @hash{ map { split / / } grep{/ /} keys %hash }; print pp \%hash;
{ "automation technology" => 2, "automation technology process" => 3, "mass creation" => 2, "rendition" => 3, "saturation" => 3, }
In reply to Re: retain longest multi words units from hash
by LanX
in thread retain longest multi words units from hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |