Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!oliveb!orc!mipos3!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.lang.perl Subject: Re: Randal's one-liners Message-ID: <1990Mar2.220159.11474@iwarp.intel.com> Date: 2 Mar 90 22:01:59 GMT References: <15214@bfmny0.UU.NET> <15216@bfmny0.UU.NET> <7250@jpl-devvax.JPL.NASA.GOV> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 38 In-Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) In article <7250@jpl-devvax.JPL.NASA.GOV>, lwall@jpl-devvax (Larry Wall) writes: | In article <15216@bfmny0.UU.NET> tneff@bfmny0.UU.NET (Tom Neff) writes: | :This is three lines out of courtesy to newsreading software -- it | :runs fine as one long line.. :-) | : | :@a=split(//,'1111211111131223311361214223121412311341121111222123616111111122'. | :'21233212615112114212321211121111222123321120');for$r(@a){for(1..$r){vec($s,$i, | :1)=$v;$i++;}$v^=1;}print"$s\n"; | | Or, more concisely, | | for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"')) | {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n"; | | And a special version just for Randal: | | grep(do{for(ord){$i+=$_%8;grep(vec($s,$i++,1)=1,5..($_>>3||print"$s\n"));}}, | (@x=split(//,"))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)\7"))); | | Larry Larry... gettin' a little too much caffeine lately? Or do you have all sortsa spare time now that Patch 9 (10,11,12... sigh) from Outer Space is complete? So, when are we going to have the official Obfuscated Perl contest announcement? :-) By the way, that last one didn't print anything for me. 'course, I'm still on Patch 6... but'll be up to 12 by the weekend (hopefully). $_=",rekcah lreP rehtona tsuJ";1while(s/(.*)(.)/(print$2),$1/eg); -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/