|
|
| Do you know where your variables are? | |
| PerlMonks |
Re: How Much Is Too Much (on one line of code)?by Random_Walk (Parson) |
| on Jun 18, 2007 at 12:22 UTC ( #621770=note: print w/ replies, xml ) | Need Help?? |
|
How about
Same caveat about hard coded GBR still applies. It is still brief but I think the logic is clearer so divided. I am aware that will kill $country == 0 but as you are checking for gbr I suspect you do not have numeric countries updateI missed the addition of [] around the country (sort of proves the danger of too much on one line) so my solution needs another line $country = "[$country]" if $country;or a re-write, I will put my thinking hat back on again ! update 2with inspiration from perrin
Cheers,
Pereant, qui ante nos nostra dixerunt!
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||