pc88mxer has provided the answer at Re: building similarity matrix.
You could set $Measure by:
my $Measure = "WordNet::Similarity::" . shift;
then do as pc88mxer suggests and create the measure object once outside the loop.
In reply to Re^3: building similarity matrix
by GrandFather
in thread building similarity matrix
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |