http://www.perlmonks.org?node_id=1015546


in reply to Replacing values in an array

Somewhat simpler version:

my( $n, %h ) = -1; my @a = map{ $h{$_} //= $n+=2 } qw[ M94202 M94150 M94297 M94150 M94161 + M94161 M94162 ];; print @a;; 1 3 5 3 7 7 9

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.