Re: parsing behavior of a subrule without/with a repetition specifier

[email protected] ((Randal L. Schwartz))
Newsgroups perl.recdescent
Organization Stonehenge Consulting Services; Portland, Oregon, USA
Message-ID <[email protected]>
>>>>> "Marcel" == Marcel Grunauer <[email protected]> writes:

Marcel> On Friday, November 9, 2001, at 01:23  PM, Marcel Grunauer wrote:
>> Now, about that  element(s)  vs.  element(s /,/)  issue.
>> 
>> To recap: the first returns an arrayref to a list of elements,
>> the second returns the last element; if you want all elements
>> of the second form, use $item{__DIRECTIVEn__}.

Marcel> To make it a little more precise: $item{element} returns the
Marcel> things stated above.

Actually, I wouldn't expect $item{element} to even be defined in the
first case.  There's no immediate subrule of the rule called
"element".  The fact that it is defined is probably just an
artifact--you're probably picking up a leftover value.

So how's that for regularity? :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.