On Sun, Oct 27, 2002 at 09:42:10PM +0200, Piedro wrote:

> Hello,
> I was wondering whether there is an integrated function in Perl, that makes
> strings' combinations,for example:
> I have 4 digits, each of which can take the discrete values of 0 and 1. I
> want to have these combinations as output.

You might try something based on glob:

  perl -wle 'print for glob "{0,1}" x 4'

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to