[tpm] hash naming convention: singular or plural
Alexander Anderson
a.anderson at utoronto.ca
Fri Aug 8 08:38:29 PDT 2008
Hello Toronto Perl Mongers,
Names of scalars are usually singular, for example,
$month = 'Aug';
Names of arrays are usually plural, for example,
@months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
How do you name your hashes, for example,
%months = ( Jan => 1, Feb => 2, ..., Dec => 12 );
or
%month = ( Jan => 1, Feb => 2, ..., Dec => 12 );
Thanks.
More information about the toronto-pm
mailing list