in reply to Plural variable naming (or not?)

Just use both:
use Data::Alias; my @plural = qw[foo bar baz]; alias my @singular = @plural; say $singular[1]; $singular[2] = "qux"; say "@plural"; __END__ bar foo bar qux

Replies are listed 'Best First'.
Re^2: Plural variable naming (or not?)
by Tuppis (Initiate) on Jun 29, 2011 at 00:00 UTC
    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