my @tests = ( "tfred", "tjock", "tfortytwo" ); #### my %ntests = map { $_ => 0 } @tests; #### my %ntests; @ntests{@tests} = (0) x @tests; #### my $mol = "forty two" x ($n == 42); #### my $mol = ($n == 42) ? "forty two" : ""