Re: Santa Hole 5 (wc.pl) Post Mortem

2001-12-07 Thread BooK
En réponse à Piers Cawley [EMAIL PROTECTED]: Michael G Schwern [EMAIL PROTECTED] writes: On Fri, Dec 07, 2001 at 10:36:50AM +1100, [EMAIL PROTECTED] wrote: --- Piers Cawley - 21 #!/usr/bin/perl -lp $#='%010g'}{$_=$. Shouldn't that be 20? Nope. The space

Re: Santa Hole 5 (wc.pl) Post Mortem

2001-12-07 Thread Piers Cawley
BooK [EMAIL PROTECTED] writes: En réponse à Piers Cawley [EMAIL PROTECTED]: Michael G Schwern [EMAIL PROTECTED] writes: On Fri, Dec 07, 2001 at 10:36:50AM +1100, [EMAIL PROTECTED] wrote: --- Piers Cawley - 21 #!/usr/bin/perl -lp $#='%010g'}{$_=$. Shouldn't

Re: Santa Hole 5 (wc.pl) Post Mortem

2001-12-07 Thread Keith C. Ivey
--- Keith C Ivey - 22 #! /usr/bin/perl -lp }{$_=7e10+$.,s$.$$ Looks like I was the only one who didn't use printf on this hole (other than Piers, but using $# is similar), and I was only one stroke short of the winners. I'm surprised no one submitted anything with 0

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Karsten Sperling
Piers and Karsten both found shorter multi-line solutions: Piers: Grr... that one line rule is *so* silly: #!/usr/bin/perl -p0 $_=$1while/ (.+)^/ms Karsten: #!/usr/bin/perl -p0 $_=$1while/ (.* )./s Both of these are really 25 chars (counting the \n's within the program as one char

Re: Santa Hole 5 (wc.pl) Post Mortem

2001-12-07 Thread BooK
En réponse à Keith C. Ivey [EMAIL PROTECTED]: --- Keith C Ivey - 22 #! /usr/bin/perl -lp }{$_=7e10+$.,s$.$$ Looks like I was the only one who didn't use printf on this hole (other than Piers, but using $# is similar), and I was only one stroke short of the

Re: Santa Hole 5 (wc.pl) Post Mortem

2001-12-07 Thread Philippe 'BooK' Bruhat
On Fri, 7 Dec 2001, BooK wrote: En réponse à Keith C. Ivey [EMAIL PROTECTED]: I'm surprised no one submitted anything with 0 x10, but I guess those always end up too long. Well, I tried a lot of thing with x10, like $-x10, because I wanted really hard to use the magic features of ++

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Philip Newton
On Fri, 7 Dec 2001 10:58:03 +1100 , [EMAIL PROTECTED] (Andrew Savige) wrote: *** Hole 4 (mid.pl) *** --- Piers Cawley - 25 #!/usr/bin/perl -p0 $_=$1while/.(^.+)^/ms --- Rick Delaney - 25 #!/usr/bin/perl -p0 $_=$1while/.^(.+)^/sm --- Karsten

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Eugene van der Pijll
Philip Newton schreef op 07 december 2001: On Fri, 7 Dec 2001 10:58:03 +1100 , [EMAIL PROTECTED] (Andrew Savige) wrote: *** Hole 4 (mid.pl) *** --- Piers Cawley - 25 #!/usr/bin/perl -p0 $_=$1while/.(^.+)^/ms --- Rick Delaney - 25

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Rick Klement
Eugene van der Pijll wrote: One of my more interesting tries on this hole was int.5+($.-=2)/2||print for Eugene The one I did that I liked was sub{shift,pop while@_2;print@_}-() -- Rick Klement

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Piers Cawley
Eugene van der Pijll [EMAIL PROTECTED] writes: Philip Newton schreef op 07 december 2001: On Fri, 7 Dec 2001 10:58:03 +1100 , [EMAIL PROTECTED] (Andrew Savige) wrote: *** Hole 4 (mid.pl) *** --- Piers Cawley - 25 #!/usr/bin/perl -p0 $_=$1while/.(^.+)^/ms ---

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Jeff 'japhy' Pinyan
On Dec 7, Rick Klement said: sub{shift,pop while@_2;print@_}-() @_=;shift,pop while@_2;print@_ -- Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for Regular Expressions in Perl

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Rick Klement
Jeff 'japhy' Pinyan wrote: On Dec 7, Rick Klement said: sub{shift,pop while@_2;print@_}-() @_=;shift,pop while@_2;print@_ shift() and pop() only default to @_ in a sub{} ... (that's what I liked about it) -- Rick Klement

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Jeff 'japhy' Pinyan
On Dec 7, Rick Klement said: Jeff 'japhy' Pinyan wrote: On Dec 7, Rick Klement said: sub{shift,pop while@_2;print@_}-() @_=;shift,pop while@_2;print@_ shift() and pop() only default to @_ in a sub{} ... (that's what I liked about it) Oh, that's right. That's why I didn't use that

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Ton Hospel
In article [EMAIL PROTECTED], Eugene van der Pijll [EMAIL PROTECTED] writes: int.5+($.-=2)/2||print for You can use |0 for a short truncate. Also interesting is the behaviour of --$.-$a++ and maybe --$.^$a++ for use in a grep or map, but i found nothing short enough based on