>> Jasper McCrea <[EMAIL PROTECTED]> writes: > -l print map/[3-9]/?'':/1/?$":'-',0..2x pop
Cool, someone submitted something like my solution :-) The cantor set is the set of all the numbers whose base-3 representation doesn't contain a "1" in them. All you need is the set of all the numbers in base-3 representation between 0 and n, where n is function f of the level. f(0) = 0, f(1) = 2, f(2) = 8, ... in base-3 this is f(0) = 0, f(1) = 2, f(2) = 22. Now it should be obvious what the Perl program above is doing. Marcelo, who, sadly, had a really busy week