Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 chilling in the Monastery: (4)
As of 2014-08-01 07:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (257 votes), past polls