Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Perl Best Practices for naming variables

by pg (Canon)
on Aug 07, 2005 at 06:11 UTC ( #481623=note: print w/ replies, xml ) Need Help??


in reply to Perl Best Practices for naming variables

Other than use plural for collections (array/hash), it is also nice if you can name the "iterator" wisely:

for my $friend (@friends) { #the relationship between $friend and @fri +ends are visually clear ... }

And

for my $person (keys(%phone_numbers)) { #$person clearly tells the mea +ning of the hash key $phone_numbers{$person}... }


Comment on Re: Perl Best Practices for naming variables
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-12-21 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (107 votes), past polls