in reply to Re^3: Pascal-Sierpinski for golfers
in thread Pascal-Sierpinski for golfers
With the same idea for Sierpinki:There are a variety of Sierpinski triangle solutions given in the documentation for Acme::EyeDrops. For example, this short one was composed by mtve in 2002:#!/usr/bin/perl -l print,s/^/_/,s/./$'& z^$&^Z/eg,y/5/o/for($a=o)x80
This version takes a single command line argument; running "perl sier.pl 5", for example, produces the same result as that shown in Re: Pascal-Sierpinski for golfers.#!perl -l $x=2**pop;print$"x--$x,map$x&$_?$"x2:"/\\",0..$y++while$x
|
---|
In Section
Cool Uses for Perl