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

Re: About the use of the plural form for the name of variables

by choroba (Cardinal)
on Nov 08, 2012 at 15:22 UTC ( [id://1002922]=note: print w/replies, xml ) Need Help??


in reply to About the use of the plural form for the name of variables

The main problem of the first sample is it uses the same name for the scalar and the array. Avoid such situations, whether you use plurals for arrays or not.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
  • Comment on Re: About the use of the plural form for the name of variables

Replies are listed 'Best First'.
Re^2: About the use of the plural form for the name of variables
by grondilu (Friar) on Nov 08, 2012 at 17:17 UTC

    Being able to use the same name for two variables, one array and one scalar, is something I actually like about Perl.

    One thing I don't like about programming is that I always have to think about variable names. So to me any way to reduce the need to do it is good news.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-23 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found