# tilly's combinator sub c { @r='';@r=map{$c=$_;map$c.$_,@r}@_ for 1..shift;@r } print join $/, map "#$_", c qw(3 00 33 66 99 CC FF);