Re: Permutations.

[email protected] ((Ton Hospel))
Newsgroups perl.golf
Organization lunix confusion services
Message-ID <[email protected]>
In article <[email protected]>,
	Eugene van der Pijll <[email protected]> writes:
> perl -lne'sub a{print+local$*=$*.shift,a(@_)for(1)x@_};a/./g'
> 
> is the golf version. This one takes input from STDIN, as requested.
> Same output, different order:
> 
> perl -Xlne'sub a{print+local$*=pop.$*,a(@_)for(1)x@_};a/./g'
> 
Or, assuming a restricted character set:
-ln s/./{$&,}/g;print for<$_ >
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.