in reply to perlgolf - bruteforceing an array

Here's a hint that might be helpful: think of the array ('#','*',0..9) as a base for a 12-digit system (duodecimal). Then in a loop like this:
foreach my $decimal (1 .. 100000000) { ###convert $decimal to 12-base system }