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

Does this look right? Accessing a plural array for a singular element

my @replies = ( 'so', 'plurals', { 'you' => 'think?' } ); my $answer = $replies[2]->{you}; print $answer;

Replies are listed 'Best First'.
Re: Re: Re: Plural variable naming (or not?)
by cjf (Parson) on Mar 19, 2002 at 20:36 UTC

    Actually, yes, it does :)

    It might only appear right to me because I've become accustomed to doing it that way. I do see your point, but I still find plural array names feel more natural than singular ones:

    my @reply = qw/a singular array name? how odd/; my $cannotnamethisreply = $reply[5]; print $cannotnamethisreply;

    Now that looks stranger to me than using a plural for the array name and a singular for the related scalar. I can understand either view though. :)