use strict; use warnings; my @entity = ( 35000, 41000, 16000, 18000, 21000, 45000, 27000, 10000, 16000, ); my( @sample ) = @entity{ 8, 8, 3, 1, 5, 0, 0 }; my $prob = probability( \@entity, \@sample );