my %weights = do { my $i = 0; map { $_ => $i++ } qw(start stop step other stuff in order here) };