Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Plural variable naming (or not?)

by Tuppis (Initiate)
on Jun 29, 2011 at 00:00 UTC ( [id://911876]=note: print w/replies, xml ) Need Help??


in reply to Re: Plural variable naming (or not?)
in thread Plural variable naming (or not?)

Hi,
Let's keep this oldies but interesting post running. :)
PERL has a point in using singular even for arrays. That is the sigil. Saying @persons is superfluous, @ marks it's a list (an array) of something. $car[3] could be read for example as 'Third car in the array' or 'Car number three in the array'.
Square brackets will reveal if it's an array if in doubt. Consistency is important. Perlstyle could give some advice also in this matter.
Beers, T

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 06:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found