Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!usc!apple!coherent!dplatt From: dplatt@coherent.com (Dave Platt) Newsgroups: comp.lang.perl Subject: Re: Randal's one-liners Message-ID: <48497@coherent.coherent.com> Date: 4 Mar 90 04:25:11 GMT References: <15214@bfmny0.UU.NET> <15216@bfmny0.UU.NET> <7250@jpl-devvax.JPL.NASA.GOV> Reply-To: dplatt@coherent.com (Dave Platt) Organization: Coherent Thought Inc., Palo Alto CA Lines: 28 In article <7250@jpl-devvax.JPL.NASA.GOV> lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: > 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 "He's creayted a MONstah!" (in the proper sepulchral tones, of course). Some time ago, a friend related reading a comment... "If awk is the Swiss Army knife of Unix programming, perl is the Swiss Army chainsaw!" I think this understates the case... does anybody know if the Swiss Army has a shmoo as a mascot? ;-} -- Dave Platt VOICE: (415) 493-8805 UUCP: ...!{ames,apple,uunet}!coherent!dplatt DOMAIN: dplatt@coherent.com INTERNET: coherent!dplatt@ames.arpa, ...@uunet.uu.net USNAIL: Coherent Thought Inc. 3350 West Bayshore #205 Palo Alto CA 94303