Prev: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Next: FAQ 9.14 How do I make sure users can't enter values into a form that cause my CGI script to do bad things?
From: sln on 29 Mar 2010 13:55 On Mon, 29 Mar 2010 10:50:27 -0700, sln(a)netherlands.com wrote: > if (/^ ([-+]*?) ([0-9a-f]+$) /xi) { ^ works, but looks weird, but it was a typo. if (/^ ([-+]*?) ([0-9a-f]+) $/xi) {
From: Dr.Ruud on 29 Mar 2010 14:33 Uri Guttman wrote: > i wouldn't consider any of the shorter answers close to golf. they are > all clear, formatted, using normal variable names, etc. if you think > that is golfing, you ain't seen real perl golf. The other way around is also good training: Put an entertaining expression at the end of your module that compiles into 1. !!"perfect"; -- Ruud
From: Marc Girod on 29 Mar 2010 15:35 On Mar 28, 6:27 pm, sreservoir <sreserv...(a)gmail.com> wrote: > oh, don't use the 'tight/clever/good' code. They may well be clever and > concise, but as a programmer, you're primary goal is to write readable, > reusable code, and golfing produces much less than readable code. In practice, I meet much more code which is unreadable out of needless verbosity, than out of excessive concision. Marc
From: sreservoir on 29 Mar 2010 16:54
On 3/29/2010 3:35 PM, Marc Girod wrote: > On Mar 28, 6:27 pm, sreservoir<sreserv...(a)gmail.com> wrote: > >> oh, don't use the 'tight/clever/good' code. They may well be clever and >> concise, but as a programmer, you're primary goal is to write readable, >> reusable code, and golfing produces much less than readable code. > > In practice, I meet much more code which is > unreadable out of needless verbosity, than > out of excessive concision. that's because you've don't go read the perl golf archives out of boredom. :) -- "Six by nine. Forty two." "That's it. That's all there is." "I always thought something was fundamentally wrong with the universe." |