Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How Much Is Too Much (on one line of code)?

by simonm (Vicar)
on Jun 20, 2007 at 20:11 UTC ( [id://622382]=note: print w/replies, xml ) Need Help??


in reply to How Much Is Too Much (on one line of code)?

Why use two lines, when one will do? (*grin*)
my ($country) = map { ( ! $_ or $_ eq 'gbr' ) ? '' : "[$_]" } $card- +>country;
(And yes, I know this doesn't preserve values of zero or undef, but it seems unlikely that's desirable...)

Replies are listed 'Best First'.
Re^2: How Much Is Too Much (on one line of code)?
by Anonymous Monk on Jun 21, 2007 at 09:04 UTC
    well said...
    and much much more readable....the best one so far....

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://622382]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-24 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found