in reply to Re: building similarity matrixin thread building similarity matrix
pc88mxer has provided the answer at Re: building similarity matrix.
You could set $Measure by:
my $Measure = "WordNet::Similarity::" . shift; [download]
then do as pc88mxer suggests and create the measure object once outside the loop.