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

Re: Please fix my writing style

by dragonchild (Archbishop)
on Nov 22, 2008 at 04:53 UTC ( #725287=note: print w/ replies, xml ) Need Help??


in reply to Please fix my writing style

Whenever you have a variable named after what you plan on putting in it, that's a problem. You want the variable to describe what it holds, not -be- what it holds. You want a hash.

my %teams = map { lc } map { split /:\s+/ } map { chomp; $_ } <DATA>;
That's probably one of the more "Perlish" ways of writing that. Your datafile's format sucks, which is your problem. Pretty code and sucky input generally don't mix. "A" input gets to play with "A" code. "C" input plays with "C" code. All the special cases.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?


Comment on Re: Please fix my writing style
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-08-01 22:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (51 votes), past polls