in reply to generating random thruth-tables

Really no need for both print and sprintf when just printf will suffice. And while I'm at it, I'll just reach into my (perl) golf bag and club your code down some:
perl -e'printf"%03b %b\n",$_,rand(2)for 0..7'

Replies are listed 'Best First'.
Re^2: generating random thruth-tables
by ambrus (Abbot) on Sep 24, 2008 at 18:24 UTC

    You can chop one character off like perl -e'printf"%03b %b\n",$_,rand 2for 0..7'.

Re^2: generating random thruth-tables
by neniro (Priest) on Sep 24, 2008 at 16:11 UTC
    I really like this - it's shorter and easier to read!