sub charset_combinations { my @charsets = map [split//], @_; map join("", @$_), @{ combinations( @charsets ) }; }