PWC 193
PWC 193 Caveat that my scripts are all first pass solutions (I think it shows :-). Not optimized. Challenge 1 (Binary string) We are given an integer n say, and asked to print out all the binary numbers of length n or less. This is a one-liner in all three languages. In my scripts, n is read from the command line. Here it is for n=3. In Perl 5: perl -e 'for (eval ("0b".(0 x $ARGV[0]). ".." . "0b". (1 x $ARGV[0]))){printf("%b\n",$_)}' 3 In Raku: raku -e 'use MONKEY-SEE-NO-EVAL; for (EVAL("0b" ~ (0 x @*ARGS[0]) ~ ".." ~ "0b" ~ (1 x @*ARGS[0]))) {printf("%b\n",Int($_))}' 3 In Julia: julia -e 'for i in (parse( Int64, "0b" * repeat( "0", parse( Int64,ARGS[1] ))) : parse( Int64, "0b" * repeat( "1", parse(Int64, ARGS[1] )))); println( SubString( bitstring(i), 65-parse(Int64, ARGS[1]))); end;' 3 In all three languages, I iterate through the range 0b0