develooper Front page | perl.fwp | Postings from March 2002

Re: TPR1 post-mortem

Thread Previous | Thread Next
F . Xavier Noria
March 8, 2002 06:38
Re: TPR1 post-mortem
Message ID:
On Fri, 8 Mar 2002 15:16:10 +0100
"Marcelo E. Magallon" <> wrote:

:  As you can see it's just a series of 1 .. 9, except for 0.  With that
:  in mind my first I tried something like (0,(1..9)x11)[$n].  Actually,
:  before that I tried something more like (0,(1..9)x2)[$a+$b]

I liked this shorcut here (that was in my last but one submission I


$b was $` in my approach, I did not find a shorter way to extract the
first digit from $` than $`&'?' there, at least $` was of type string.
and didn't need double quotes.

-- fxn

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About