Re: YN golf

2008-03-31 Thread Rick Klement
, Support -- - Free Perl Training --- http://perlhunter.com/college.html - - Gourmet Hot Cocoa Mix http://bestfriendscocoa.com - perl -le 'print for glob{Y,N}x5' -- Rick Klement

Re: [golf] Tangled Tale Results

2004-07-02 Thread Rick Klement
is the $|--. -- Rick Klement

Re: Y2K Again ??

2004-05-14 Thread Rick Klement
, I am looking forward to see what the outcome is. Brian There is no need for a regex $Yr = ($FieldA 20 ? 1900 : 2000) + $FieldA; Or just get $FieldB directly if you don't need a separate $Yr $FieldB = ($FieldA 21) + 19 . $FieldA; -- Rick Klement

Re: Y2K Again ??

2004-05-14 Thread Rick Klement
Rick Klement wrote: Brian Morgan wrote: ($Yr = $FieldA) =~ s/^(\d{2}).*/$1/; if($Yr 20){ $Yr = 19$Yr; }else{ $Yr = 20$Yr; } #Concat year to FieldB There is no need for a regex $Yr = ($FieldA 20 ? 1900 : 2000) + $FieldA; Or just get $FieldB directly

Re: A little arithmetic puzzle

2003-08-14 Thread Rick Klement
/ eval == 21 print for ($n$op$n)$op($n$op$n), (($n$op$n)$op$n)$op$n, ($n$op($n$op$n))$op$n, $n$op(($n$op$n)$op$n), $n$op($n$op($n$op$n)), -- Rick Klement

Re: A better way ?

2002-04-17 Thread Rick Klement
Michael G Schwern wrote: On Wed, Apr 17, 2002 at 12:28:37PM -0700, Rick Klement wrote: There's already a %dispatch set up for you by perl... I'd have used it but it just fell into the gaping security hole. A recent Phrack article pointed out that one of the SOAP/RPC/XML modules

Re: Perl Golf as a sport

2002-03-10 Thread Rick Klement
pulling, and heads banging into keyboards and brick walls... -- Rick Klement

Re: Perl Golf as a sport

2002-03-10 Thread Rick Klement
enough. (I hope these tips don't help anyone - there are enough sharks out there :) -- Rick Klement

Re: Perl Golf as a sport

2002-03-10 Thread Rick Klement
($`%10+$)%15,eg,s,,,;eg cool... -- Rick Klement

Re: TPR1 post-mortem

2002-03-09 Thread Rick Klement
$_=pop;s;.;print,s,,$*1.11%10if/\G../,eg;eg And here's a 46: -l $_=pop;s;.;print,s,,$*1.11%10if/../g,eg;eg And a 46 with a better tiebreaker value: -l $_=pop;s;.;print,s,,/../g$*1.11%10,eg;eg since the precedence problem that needed the 'if' construct is no longer there. -- Rick Klement

Re: TPR1 post-mortem

2002-03-09 Thread Rick Klement
looks at the end of the string when it sees the $, but thankfully it's not smart enough only to look near word boundaries even when there's a \b in there. Check out Eugene's: /..(?{CODE})^/ -- Rick Klement

Re: TPR1 post-mortem

2002-03-08 Thread Rick Klement
have a different version of perl to try it on? [EMAIL PROTECTED] wrote: Maybe Perl golf is useful, after all -- as a QA tool to find Perl bugs. :) -- Rick Klement

Re: TPR1 post-mortem

2002-03-08 Thread Rick Klement
-line via `perl secret.pl', but not via `./secret.pl' :-) Don't know whether the judges would have accepted it. Not allowed, by the rule: When tested, you can assume your script to have file permissions of 0644. -- Rick Klement

Re: TPR1 post-mortem

2002-03-08 Thread Rick Klement
/.?/___$`%100___/g -- Rick Klement

Re: TPR0 Final Results

2002-03-07 Thread Rick Klement
%48)while$_;print$x+0 and tweaking slightly, one gets: $\=ord(lc)%87%48+36*$\.$/for pop=~/./g;print which is a 44 :) -- Rick Klement

Re: TPR1 post-mortem

2002-03-07 Thread Rick Klement
[EMAIL PROTECTED] wrote: Correct me if I'm wrong, but there is only one golfer who has appeared on all five leaderboards: Rick Klement. (Ton also, if you count BoB in irc game). /-\ndrew Now if I could only learn how to play... :( -- Rick Klement

Re: BoB

2002-03-05 Thread Rick Klement
Philippe 'BooK' Bruhat wrote: Maybe people with the same score and tie-breaker should have the same rank And someone with the same score but not the same tie-breaker will jump a few steps backs So that everyone can see the real ranking I second this motion :) -- Rick Klement

Re: TPR(0,1)...at last

2002-03-01 Thread Rick Klement
first entry, too, although it was entered correctly on the leaderboard I know that Opera is quirky about its forms sometimes, could that be related? Patrick It happened to me too - they just said they'll fix it -- Rick Klement

Re: Fwd: Re: interesting typo I couldn't see

2002-02-21 Thread Rick Klement
for that :) I'll just let one's choice of indenting style be it's own punishment :) -- Rick Klement

Re: Fwd: Re: interesting typo I couldn't see

2002-02-21 Thread Rick Klement
Keith C. Ivey wrote: Rick Klement [EMAIL PROTECTED] wrote: Vicki Brown wrote: if (...) { my @item_parts = split(/\n/, $item); printf ORDER (\n%4d %-50s %3.2f %3.2f\n, $quantity, $item_parts[0

Re: Finding Holidays

2002-02-06 Thread Rick Klement
/mprintChristmas found on a Sunday in $_\nfor 1900..2100 -- Rick Klement

Re: Beginner's definition ?

2002-02-01 Thread Rick Klement
implementation of an algorithm - there may be a better way to implement it. 3) Read through _all_ the functions, _all_ the operators, _all_ the syntax, and _all_ the special variables, etc. If it takes playing Perl Golf to learn these programming rules, so be it... -- Rick Klement

Re: substitution question

2002-01-31 Thread Rick Klement
Pradeep Sethi wrote: Hi All, I want to change date 9/9/1987 to 09/09/1973 was wondering, what is the most efficient way ? s/\b\d\b/0$/g (it's the effects of playing a lot of golf lately... :) -- Rick Klement

Re: FORE! Get Even Golf Game Tees Off

2002-01-28 Thread Rick Klement
Yanick wrote: On Fri, Jan 25, 2002 at 12:17:05PM +1100, [EMAIL PROTECTED] wrote: Current Leaderboard --- 1. 69 Rick Klement AAAUGH!!! (and I think I speak for the vast majority of us here...) Thank you, that was the nicest

Re: Better ?

2002-01-25 Thread Rick Klement
...) -- Rick Klement

Re: Better ?

2002-01-25 Thread Rick Klement
... To your computer, where you test and experiment with stuff, and read the Perl documentation, and then try some more... :) -- Rick Klement

Re: make a 24(another practical problem)

2002-01-18 Thread Rick Klement
for $op =~ /\d/g; print ans: $f\n if 24 == eval $f; } } } It prints 20 results. -- Rick Klement

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 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: The Santa Claus Golf Apocalypse

2001-12-04 Thread Rick Klement
to a long tough wait to see some of these interesting efforts. (Of course, I'd also like to see the best score per hole, but I guess that got voted down.) -- Rick Klement