in reply to Re^4: Permutation with repetitions
in thread Permutation with repetitions

What ambrus says. However, what it won't do, is give you the names of permutations with no occurrence in the string.

If you need those, I think I can find a shortcut. Think of such a string as a 4 digit number, in base 4, with an a posteriori mapping of

( 0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd' )
or, in Perl code:
tr/0-3/a-d/
so all you really need is a 4 digit base 4 counter and this mapping. If you don't want to code this by hand, you might make use of a module like the one I found using a quick Google search, Math::BaseArith.