my %abbrevs = map { my $word = $_; ($word => join("|", map { substr($word, 1, $_) } 1 .. length($word) })) } qw( hsbn admin ... );