Re: mini-quiz

Peter Scott <[email protected]> Mon, 18 Jun 2007 13:30:14 -0700
Newsgroups gmane.comp.lang.perl.qotw.discuss
Message-ID <[email protected]>
At 11:18 AM 6/18/2007, Yitzchak Scott-Thoennes wrote:
>Things have been pretty quiet on this list, so I'm bringing up
>a question I thought would interest you all.

If I had the time to solve it myself, I'd propose we come up with 
solvers for http://www.drunkmenworkhere.org/170 .  But I don't :-(

>Ovid, on perlmonks, asks[1] if this code is doing too much on one line:
>
>     my $country = $card->country;
>     $country = $country eq 'gbr' ? '' : uc "[$country]" if $country;
>
>How would you write it?  Feel free to respond here or in the
>perlmonks thread.  No need to wait 60 hours.

Eh, I might well have written it as above; it seems fine to me.  I 
might be more inclined to change it a little like this:

my $country = $card->country;
$country and $country = $country eq 'gbr' ? ''
                                           : uc "[$country]";

but it's a toss-up.  Bigger fish to fry than this.

>[1] Ovid's question, without the (already quite a few) replies:
>http://perlmonks.org/?displaytype=print;node_id=621769

-- 
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com/
http://www.perlmedic.com/